From help-octave-request at bevo dot che dot wisc dot edu Fri Jan 16 20:25:40 2004 Subject: Re: Testing endianness From: Paul Kienzle To: Octave_post Date: Fri, 16 Jan 2004 21:25:05 -0500 On Jan 16, 2004, at 12:49 PM, John W. Eaton wrote: > > How about the following patch? With it > > octave_config_info ("words_big_endian") > > and > > octave_config_info ("words_little_endian") > > return TRUE or FALSE, and > > octave_config_info ("float_format") > > will return a string (either ieee_big_endian or ieee_little_endian on > most current systems where Octave can actually run, the notable > exception being the Cray SV1). If ever I need this (and I don't see why I would since fread/fwrite deals with endian issues for me), how would I use it? Do I need to test both conditions as in the following: if octave_config_info("words_little_endian") do little endian stuff elseif octave_config_info("words_big_endian") do big endian stuff else error("not little endian or big endian") endif Thanks, Paul Kienzle pkienzle at users dot sf dot net ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------