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

Home » Public Forums » archive » Unformatted data portability: Digital UNIX-->Windows 95
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: Unformatted data portability: Digital UNIX-->Windows 95 [message #11333 is a reply to message #11239] Mon, 23 March 1998 00:00 Go to previous messageGo to previous message
dors is currently offline  dors
Messages: 8
Registered: June 1994
Junior Member
Hi,

You are correct, FORTRAN outputs some weird marker bytes to files. On
other platforms where "/F77" isn't available you will have to keep
track of this. Using od (octal dump) on a test data file from your
shell, will help you find these marker bytes if you don't have a
manual which provides that information.

To make your code architeture independent, your best bet is to create
a case statement on "!version.os". In the various cases ("OSF",
"sunos", ...) have the architecture specific code to transform the
input data such that your output data is the same no matter what
architecture you are using. You will always have to be aware of the
architecture of the machine where the data file was written.
Prepending an ASCII header to your data files containing architecture
of the file creator will facilitate this. Then you can perform the
appropriate BYTEORDER or SWAP_ENDIAN commands to switch byte ordering
differences and appropriately remove FORTRAN codes from the data file,
if present. When writing ASCII headers to binary data files, I find
it useful to include the length in bytes or the number of lines of the
header as the first line of the header for easy decoding later.

Although I have not done this myself, I believe the use of CDF files
will provide a seemless mechanism to pass data between architectures.
So if you have FORTRAN libraries available to write CDF, you might
look into this solution.

Hope this helps,

Eric

--

============================================================ ================
| Eric E. Dors | Internet:dors@gamma.physics.uiowa.edu |
| University of Iowa | Web: http://delta.physics.uiowa.edu/~dors |
| 203 Van Allen Hall | Office: (319) 335-3828 |
| Iowa City, IA 52242 | Home: (319) 351-0887 |
============================================================ ================
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: time test MacOC
Next Topic: Printing to postscript

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

Current Time: Sat Nov 29 01:56:00 PST 2025

Total time taken to generate the page: 0.08328 seconds