From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cec65b0a3ccd802d X-Google-Attributes: gid103376,public From: Richard D Riehle Subject: Re: Big-endian vs little-endian Date: 1999/02/04 Message-ID: <79ct1p$7oe@dfw-ixnews10.ix.netcom.com>#1/1 X-Deja-AN: 440701252 References: <36B155D2.2E8573BB@wvu.edu> <7982p9$nll$3@plug.news.pipex.net> Organization: Netcom X-NETCOM-Date: Thu Feb 04 1:39:37 PM CST 1999 Newsgroups: comp.lang.ada Date: 1999-02-04T13:39:37-06:00 List-Id: In article <7982p9$nll$3@plug.news.pipex.net>, "Nick Roberts" wrote: >I can think of two possible solutions: > >(a) [ snipped > >(b) use Text_IO instead of Sequential_IO, and input and output the data in >the form of text. > >The advantage of (b) is that text is the most universal data format: The Text_IO solution is especially useful when converting floating point from one machine to floating point on another. For example, where is the sign bit on a VAX 32 floating point number? You'd be surprised! We were converting VAX floating point to IBM mainframe floating point. People came up with all sorts of algorithmic solutions. The best solution was to write the VAX numbers to a text file and read the text file back to to the IBM. No fuss. No muss. No algorithmic gymnastics. Richard Riehle richard@adaworks.com http://www.adaworks.com