Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: lionel@quark.enet.dec.com (Steve Lionel)
Subject: Re: transferring binary data from Alpha to Sun's
Date: 1995/10/12	[thread overview]
Message-ID: <45jdvr$qbv@zk2nws.zko.dec.com> (raw)
In-Reply-To: 1995Oct10.170922.1@sldb6.slac.stanford.edu


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/



           reply	other threads:[~1995-10-12  4:00 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1995Oct10.170922.1@sldb6.slac.stanford.edu>]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox