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,f46e9f8b0c4ee5c0 X-Google-Attributes: gid103376,public From: robinsoj@my-dejanews.com Subject: Re: Binary Files in Text Editor Date: 1998/11/12 Message-ID: <72f0os$23v$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 411094216 References: <72aiik$c1u$1@nnrp1.dejanews.com> <72ct6o$abi$1@nnrp1.dejanews.com> <72e9el$top@gcsin3.geccs.gecm.com> X-Http-Proxy: 1.1 x2.dejanews.com:80 (Squid/1.1.22) for client 199.89.133.176 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Nov 12 16:01:31 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT) Date: 1998-11-12T00:00:00+00:00 List-Id: I have an array of records (there are two string fields, an integer field, and a float field) that I converted from a text file to a binary file. Now I want to display those records to the screen like a list. In article <72e9el$top@gcsin3.geccs.gecm.com>, John McCabe wrote: > robinsoj@my-dejanews.com wrote: > >Let me re-phrase the question: > > > >I would like to display the contents of a binary file to the screen. My > >machine is running GNAT Ada on Windows NT. Do I have to convert a > >binary file into a text file before displaying its contents on the > >screen (or re-directing it to the printer)? > > You can display it on the screen if you like, but how you do it depends > on exactly what you are expecting to see on the screen. > > Tell us more about what you want to see and we may be able to help more. > > One possibility is to use Sequential_IO or Direct_IO to read in a byte at > a time then display the equivalent ASCII character representation. > Alternatively, you could display each byte as a hexadecimal numeric > representation. Both of these are very easy but, as I said, it depends on > what you want to see. > > -- > Best Regards > John McCabe > --------------------------------------------------------------------- > Marconi Electronic Systems > Simulation & Training Division > ===================================================================== > Not necessarily my company or service providers opinions. > ===================================================================== > > -- James H. Robinson, III -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own