You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Set json = lib.parse("{"BigNumber":32769}")
2. an Exception was raise because the CInt Cannot process the Big number
What is the expected output? What do you see instead?
Debug.Assert json.Item("BigNumber") = 32769
What version of the product are you using? On what operating system?
Please provide any additional information below.
'I use CLng to replace CInt
Private Function parseNumber(ByRef str As String, ByRef index As Long)
Dim value As String
Dim char As String
Call skipChar(str, index)
Do While index > 0 And index <= Len(str)
char = Mid(str, index, 1)
If InStr("+-0123456789.eE", char) Then
value = value & char
index = index + 1
Else
If InStr(value, ".") Or InStr(value, "e") Or InStr(value, "E")
Then
parseNumber = CDbl(value)
Else
parseNumber = CLng(value) 'CInt(value)
End If
Exit Function
End If
Loop
End Function
Original issue reported on code.google.com by [email protected] on 9 May 2010 at 1:34
The text was updated successfully, but these errors were encountered:
This needs CDbl instead of CInt. Otherwise you can get numbers which are
written as a single number but are too big for long. (because it's not written
using scientific format, the check for "e" or "E" won't pick it up).
Original issue reported on code.google.com by
[email protected]
on 9 May 2010 at 1:34The text was updated successfully, but these errors were encountered: