comp.lang.ada
 help / color / mirror / Atom feed
From: John McCabe <john@assen.demon.co.uk>
Subject: Re: Binary Files in Text Editor
Date: 1998/11/13
Date: 1998-11-13T00:00:00+00:00	[thread overview]
Message-ID: <72gv55$npp@gcsin3.geccs.gecm.com> (raw)
In-Reply-To: 72f0os$23v$1@nnrp1.dejanews.com

robinsoj@my-dejanews.com wrote:
>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.

If they're in a binary file then you need to use something like 
Sequential_IO or Direct_IO to retrieve them. Presumably the records are 
fixed length.

If you want to see the interpreted contents of the record on the screen 
then just use Ada.Text_IO, Ada.Integer_Text_IO and Ada.Float_Text_IO to 
output the fields individually.

If you want to see the records as a series of bytes on the screen, then 
you'll have to convert them individually into a representation that can 
be displayed.

I'm not sure that this answers your question though. If it doesn't can 
you give us an example of what you'd like to see?

-- 
Best Regards
John McCabe
---------------------------------------------------------------------
Marconi Electronic Systems
Simulation & Training Division
=====================================================================
Not necessarily my company or service providers opinions.
=====================================================================






  reply	other threads:[~1998-11-13  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-10  0:00 Binary Files in Text Editor robinsoj
1998-11-11  0:00 ` Dizzy Casablanca
1998-11-11  0:00 ` David C. Hoos, Sr.
1998-11-11  0:00 ` Marc A. Criley
1998-11-11  0:00 ` robinsoj
1998-11-12  0:00   ` John McCabe
1998-11-12  0:00     ` robinsoj
1998-11-13  0:00       ` John McCabe [this message]
1998-11-14  0:00       ` Jerry van Dijk
1998-11-11  0:00 ` John McCabe
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox