scan dbl does not handle -inf, returns +inf instead
https://bitbucket.org/drjdpowell/jsontext/src/388ff02bbd9e30ebb0f8b4e83bc47da78df49b83/support/Get%20DBL.vi?at=default&fileviewer=file-view-default In the case "-Inf", returns Inf instead. Also it looks like the parser can't parse "Inf" or "-Inf" either, only the fully spelled out versions
Comments (6)
-
-
repo owner -
assigned issue to
-
assigned issue to
-
repo owner Thanks. Fixed the -Infinity thing.
But, should we support Inf and -Inf? They aren't proper JSON, and the LabVIEW extention is to use Infinity and -Infinity. Do other-language JSON libraries produce Inf/-Inf?
-
repo owner Note: to support Inf/-Inf, we would have to modify "Advance Past Number.vi"
-
I guess it didn't notify you? I made a pull request with both changes here and thought I assigned it to you: https://bitbucket.org/drjdpowell/jsontext/pull-requests/2/fix-issue-19/diff Well anyway, not exactly a complex issue :)
I'm in favor of supporting both Inf and Infinity as Inf is what people see when they look at infinity on the diagram and its the most common abbreviation for infinity. Its also only a change on the parsing side -- the code still generates the more standard "Infinity" but accepts Inf as another representation.
-
repo owner - changed status to resolved
Resolving, as main -Infinity issue fixed (holding off on Inf/-Inf).
- Log in to comment
To be clear, when it parses the string "-Infinity" it gets converted to the dbl value Inf. It does not appear to understand the string "Inf" or "-Inf". "Infinity" gets parsed correctly.