octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #47741] The scanf family of functions cannot p


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #47741] The scanf family of functions cannot parse 64bit hex numbers on Windows and 32bit Linux
Date: Wed, 20 Apr 2016 18:42:53 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0

Follow-up Comment #3, bug #47741 (project octave):

For Matlab compatibility, from the help for fscanf, it seems they do not
support any length modifiers other than "l". They list the following
two-character conversions as supported: %ld, %li, %lu, %lo, %lx.

They also say that those conversions read 64-bit values, so I guess that is a
change we'll have to make.

As for the return value, the help says that if all conversions are
signed/unsigned 64-bit integers (meaning all %l+something), then the returned
array is of type int64 or uint64.

https://www.mathworks.com/help/matlab/ref/fscanf.html

Beyond that, any other length specifiers we support in addition, like "%hd" or
"%jx" or "%lf" is up to us.

I would be curious what Matlab returns for


sscanf('1000000000', '%d')
sscanf('3000000000', '%d')
sscanf('6000000000', '%d')



    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47741>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]