* Re: transferring binary data from Alpha to Sun's
[not found] ` <1995Oct10.170922.1@sldb6.slac.stanford.edu>
@ 1995-10-12 4:00 ` Steve Lionel
0 siblings, 0 replies; only message in thread
From: Steve Lionel @ 1995-10-12 4:00 UTC (permalink / raw)
In article <1995Oct10.170922.1@sldb6.slac.stanford.edu>,
fairfield@sldb6.slac.stanford.edu writes:
|> But since you've got an Alpha with DEC Fortran, Digital has
|> already solved your problem: you can use the non-standard keyword
|> CONVERT in the OPEN statement on the Alpha (both for read and write)
|> to convert to and from big-endian IEEE format. This will work fine
|> if all your data are single- or double-precision REALs. My
|> recollection is that it won't work for mixed data type records (but
|> check me on this). However, on OpenVMS you can call the Run-time
|> Library routine CVT$CONVERT_FLOAT to do the conversion on an
|> item-by-item basis. I would guess, but I don't know, that a similar
|> conversion function exists for DEC UNIX.
It does work for mixtures of datatypes in a record, but not if you use the
STRUCTURE/RECORD extension. The CONVERT= option is available on all
DEC Fortran platforms (and will also do endian-swaps for integers.)
The Digital UNIX equivalent of CVT$CONVERT_FLOAT is cvt_ftof.
--
Steve Lionel Mail: lionel@quark.enet.dec.com
DEC Fortran Development WWW: http://www.digital.com/info/slionel.html
Digital Equipment Corporation CompuServe: 75263,3001
110 Spit Brook Road, ZKO2-3/N30
Nashua, NH 03062-2698 "Free advice is worth every cent"
For information on DEC Fortran 90, see http://www.digital.com/info/hpc/f90/
^ permalink raw reply [flat|nested] only message in thread