From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,904923f71fff2e61,start X-Google-Attributes: gid1164f8,public From: lionel@quark.enet.dec.com (Steve Lionel) Subject: Re: transferring binary data from Alpha to Sun's Date: 1995/10/12 Message-ID: <45jdvr$qbv@zk2nws.zko.dec.com>#1/1 X-Deja-AN: 117439227 distribution: world references: <1995Oct10.170922.1@sldb6.slac.stanford.edu> organization: Digital Equipment Corporation, Nashua NH reply-to: lionel@quark.enet.dec.com (Steve Lionel) newsgroups: comp.sys.dec 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/