On Tue, 2 Mar 2004, Richard Maine wrote:
> Joerg Stiller writes:
>
> > - wether there is a standard way to convert between Big and Little
> > Endian formats?
>
> The simple direct answer is "no". There are some nonstandard
> compiler-specific ways, but nothing standard. If the compiler doesn't
> support something, it can be pretty tricky because you likely can't
> even read in the records at all without trickery. That's because
> the record length fields in the headers will also be btye-swapped
> as well as the data. In this case, you are reduced to reading in
> the raw byte stream and doing the record management yourself by
> hand. This is simple enough in principle, but quite tedious.
just to add my 2 cents on this issue. i will recommend using an external
library for dumping data in a platform portable manner. i have been using
netcdf and i'm very happy with it. yet another popular data format is hdf5
(but i found the interface to be a bit complicated for my purpose)
renchi
|