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

Home » Public Forums » archive » Re: Mixing ASCII and Binary in files
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: Mixing ASCII and Binary in files [message #22552 is a reply to message #22547] Wed, 15 November 2000 00:00 Go to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior Member
Ben Tupper wrote:
> I have a question regarding mixing ASCII data (as a header) with binary
> data (as data following the header). This is a desirable format for our
> purposes for a number of reasons. I have come across such files
> generated in the DOS environment from Sea-Bird Electronics devices.
>
> I am able to read and write such files in MacOS using IDL without
> difficulty; I am unable to do the same in Windows.

Ben, did you try using the OPEN keywords /BINARY and /NOAUTOMODE in
Windows (I believe these keywords are no longer required in IDL 5.4).

> From within IDL, is it possible to write such a file so that it is
> readable across all platforms? If so, how?

BINWRITE and BINREAD are designed for this sort of thing. If you want to
include a string, convert it to BYTE type before writing it, and then
convert back to STRING type after reading it.
http://cimss.ssec.wisc.edu/~gumley/binarytools.html

Of course if you want to go full steam on this, you may want to consider
netCDF or HDF.

Cheers,
Liam.
http://cimss.ssec.wisc.edu/~gumley
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How to display image on X root window?
Next Topic: Re: IDL under PPCLinux?

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

Current Time: Wed Oct 08 15:56:45 PDT 2025

Total time taken to generate the page: 0.00443 seconds