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

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

[Octave-bug-tracker] [bug #41672] fread for "float" not matlab compatibl


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #41672] fread for "float" not matlab compatible
Date: Mon, 10 Mar 2014 04:38:37 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.123 Safari/537.36

Update of bug #41672 (project octave):

                  Status:                    None => Need Info              

    _______________________________________________________

Follow-up Comment #3:

This seems to be the case, the docs for fread/fwrite don't seem to distinguish
between platform types.

Someone could verify by running the following in Matlab on 64-bit Windows:


fid = fopen('test.dat', 'wb');
fwrite(fid, int64(-1), 'int64');
pos = ftell(fid)
fclose(fid);
fid = fopen('test.dat', 'rb');
arr = fread(fid, inf, 'long')
pos = ftell(fid)
fclose(fid);


In 64-bit Octave, arr is a one-element array of -1, but in 64-bit Matlab it
may be a two-element array of -1.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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