I have a strange result coming from some great math, and don't know why I am getting a different answer from vb.net vs python.
Below are quick snippets and results:
VB.NET Dim MSB As UInt32 = 3067297518 Dim LSB As UInt32 = 1439785590 Dim sqln As UInt64 = MSB * (2 ^ 32) + LSB Python: sqln = msb * (2 ** 32) + lsb Python Result: 13173942528351756918 VB RESULT: 13173942528351756288
Note. I am also trying to declare sqln as ULong and Double (same answer) MSB and LSB are a match in both debuggers - !! ??
Any ideas? = + My thanks
Great John is very eloquent and it works! One small continuation, could you suggest a fix for the final part? I believe the same thing happens even if you got my sqln straightened up :)
python says: = bdntyxtax2smq vb.net says: = bfpuzytbx3s00 VB.NET Dim sqlid As String = "" Dim alphabet As String = "0123456789abcdfghjkmnpqrstuvwxyz" For iCount = 0 To 12 sqlid = alphabet((sqln / (32 ^ iCount)) Mod 32) + sqlid Next Python: for i in range(0, 13): sqlid = alphabet[(sqln / (32 ** i)) % 32] + sqlid
source share