⎕JSON Comparaison Tolerance

General APL language issues

⎕JSON Comparaison Tolerance

Postby PGilbert on Mon Apr 13, 2020 9:16 pm

When I do the following:

Code: Select all
    ⎕JSON 0.04+⍳10

I would expect to get a 8.04 and 9.04 in the JSON character representation.

I am using v16. Is this normal ?
User avatar
Posts: 419
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: ⎕JSON Comparaison Tolerance

Postby petermsiegel on Tue Apr 14, 2020 5:09 am

Hmm.... In 17.1, it works as expected...
Code: Select all
⍝  Dyalog APL/S-64 Version 17.1.36845  (ALSO Dyalog APL/S-64 Version 17.0.36563)
       ⎕JSON 0.04+⍳10
Posts: 98
Joined: Thu Nov 11, 2010 11:04 pm

Re: ⎕JSON Comparaison Tolerance

Postby AndyS|Dyalog on Thu Apr 16, 2020 8:52 am

In 16.0 the code for ⎕xml (and indeed ⎕csv) used the standard c library functions for formatting. In 17.0 and later we changed them so that they now call the same formatting functions as used elsewhere in the interpreter. So yes, it is what I'd expect in 16.0.
User avatar
Posts: 243
Joined: Tue May 12, 2009 6:06 pm

Return to Language

Who is online

Users browsing this forum: No registered users and 0 guests