From help-octave-request at bevo dot che dot wisc dot edu Wed Jan 21 15:40:05 2004 Subject: Re: Testing endianness From: "John W. Eaton" To: Paul Kienzle Cc: Octave_post Date: Wed, 21 Jan 2004 15:38:46 -0600 On 16-Jan-2004, Paul Kienzle wrote: | 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? Right, I'm not sure whether it is necessary to have this, but it was a bit of configuration information that was not available at the interpreted level of the language. | 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 Right, I wasn't sure what to do. We have both words_big_endian and words_little_endian in C++, so I just put both in octave_config_info. If neither are true, I imagine it is a bug. Would it be better to have a different single value stored in octave_config_info? If so, what would you like to call it? jwe ------------------------------------------------------------- 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 -------------------------------------------------------------