comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Help: Byte-swapping program
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Help: Byte-swapping program [message #3332 is a reply to message #3331] Mon, 12 December 1994 07:39 Go to previous messageGo to previous message
grunes is currently offline  grunes
Messages: 68
Registered: September 1993
Member
In article <schaep-1212941334430001@130.60.16.90> schaep@rsl.geogr.unizh.ch (Michael E. Schaepman) writes:
> Since we are moving our data from a VAX and a DecStation to Suns and Macs,
> I am looking for a program, that converts big <> low-endian byte order and
> IEEE <> VAX representation.
...

I may have been wrong!

I can't remember anymore, but I'm not sure a simple byte order reversal
will fix the problem for 4 byte integers. VAX floating point numbers
used a real strange byte order (see previous post), and it's possible
that VAX 4 byte integers do too. In that case my previous suggestion
of
BYTEORDER,A
will NOT work.

BTW, you could easily run into other problems from the fact that VAX
and some other platform compilers frequently add extra little bytes
into the file formats, and there is no agreement between platforms
and sometimes compilers on what those bytes might be. For example,
it is common to have a few bytes of header at the beginning, and
some sort of record length before (and sometimes after) each record.

One of the nice things about IDL and PV-Wave is that (as far as I know)
READU and WRITEU don't assume or add in any extra bytes. BUT I haven't
used IDL/Wave much on the VAX, and it might be an exception.
(opinions expressed are mine alone)
Mitchell R Grunes (grunes@nrlvax.nrl.navy.mil)
Allied-Signal Technical Services
c/o Code 8140 Naval Research Lab
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Array variable in extended memory - IDL
Next Topic: Contour labels screwed up when using MAXVALUE

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 14:33:35 PDT 2025

Total time taken to generate the page: 0.40155 seconds