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: John McCabe Subject: Re: Binary Files in Text Editor Date: 1998/11/12 Message-ID: <72e9el$top@gcsin3.geccs.gecm.com>#1/1 X-Deja-AN: 411033139 Content-Transfer-Encoding: 7bit References: <72aiik$c1u$1@nnrp1.dejanews.com> <72ct6o$abi$1@nnrp1.dejanews.com> Content-Type: text/plain; charset=us-ascii Organization: Avatar Computer Consultants Limited Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-11-12T00:00:00+00:00 List-Id: 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. =====================================================================