Thu 31 Aug 2017 10:48:41 PM UTC, comment #6:
I made Octave compatible with Matlab both in action and in documentation in this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/3706091dc91c). Marking as Fixed and closing report.

Sat 26 Aug 2017 10:00:04 PM UTC, comment #5:
I changed the documentation to show that "float" is not systemdependent, but actually 32 bits (http://hg.savannah.gnu.org/hgweb/octave/rev/58435a400d4e).
The Matlab documentation for fread (http://www.mathworks.com/help/matlab/ref/fread.html) has a table with all of the sizes in bits and bytes for each type. These are not platform dependent. Should the function "oct_data_conv::string_to_data_type (const std::string& str)" in liboctave/util/dataconv.cc be rewritten?
Here is an excerpt:
Given that the sizes are fixed, it seems like "schar", for example, should return dt_int8 rather than dt_schar.
This would also be the place to change unsigned long to return 32 bits.

Wed 19 Mar 2014 06:46:48 PM UTC, comment #4:
> Does Matlab really always force long to be 32 bits, even on 64bit Linux systems?
Yes, it does.
On 64bit Windows R2011a and 64bit Linux R2010a:

Mon 10 Mar 2014 04:38:36 AM UTC, 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 64bit Windows:
In 64bit Octave, arr is a oneelement array of 1, but in 64bit Matlab it may be a twoelement array of 1.

Sun 23 Feb 2014 07:09:43 PM UTC, comment #2:
I suspect that Matlab dropped the systemdependence of the float at some point. We can too.
As for integer types, I think it is pretty much universal now that short is 16 bits and int is 32 bits and on 32bit systems, long is also 32 bits. But on 64bit systems, long is 64 bits on Linux systems and still 32 bits on Windows systems. Does Matlab really always force long to be 32 bits, even on 64bit Linux systems? If so, I guess we have to do the same or I'm sure we'll eventually get complaints about that difference.

Sun 23 Feb 2014 06:33:17 PM UTC, comment #1:
I think we've eliminated support for all nonIEEE floating point types now, so float will always be 32 bits. But that could be made more explicit to be Matlab compatible. I think the integer types are more troublesome, if we want Matlab compatibility we should get rid of all platformdependence for the type names, right?

Sat 22 Feb 2014 09:58:20 PM UTC, original submission:
This may just be a documentation issue. According to Matlab's documentation for fread (http://www.mathworks.com/help/matlab/ref/fread.html), the 'float' type should always be 32 bits. Octave's documentation states that the 'float' type is platform dependent. In fact this difference occurs for all the types which are not strictly defined by a standard (so short, long, etc.).
I don't if Octave is actually doing what it is saying it does, or whether it too just assumes float is 32 bits always.
