Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!nrcm3.nrc.ca!SERRER From: SERRER@nrcm3.nrc.ca (Martin Serrer - Systems Manager) Newsgroups: comp.sys.sgi Subject: Binary representation of REAL #'s VAX vs.IRIS Message-ID: <90Jan4.144239est.57496@ugw.utcs.utoronto.ca> Date: 4 Jan 90 19:33:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 27 Hello all, I asked this list sometime ago about moving binary files from a VAX to our IRIS 4D50 via 4DDN and I thank you for the replies recieved. I have another problem now. These files were created on the VAX with a piece of FORTRAN code. The records are were written as unformatted REAL*4 (F_floating) ie. four bytes arranged as follows. bits 15 14 7 6 0 +-----------------------------------------------+ |sign| exponent | fraction | +-----------------------------------------------+ | fraction | +-----------------------------------------------+ bits 31 16 I need to read these data files with a C program on the IRIS. Has anyone written such a piece of code?? How are reals stored on the IRIS?? Any help would be appreciated. I found the SWAP_* and SEX routines in the programmers reference manual and hoped that they might be of some use but they are not documented in a particularly useful manner. +-----------------------------------------------------------------------------+ | Martin Serrer Systems Lab., Bldg. M3, Montreal Rd.| | 613-993-9442 (Bell) National Research Council of Canada,| | serrer@syslab.nrc.ca (BITNET) Ottawa, Ontario, Canada K1A-0R6 | +----------Software Rusts...------------------Rust never Sleeps...------------+