From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: how to read a text file?
Date: Mon, 8 Mar 1993 03:49:32 GMT
Date: 1993-03-08T03:49:32+00:00 [thread overview]
Message-ID: <1993Mar8.034932.15763@seas.gwu.edu> (raw)
In-Reply-To: C3JIDH.466@ccu.umanitoba.ca
In article <C3JIDH.466@ccu.umanitoba.ca> umcha225@ccu.umanitoba.ca (Samson S. W. Chan) writes:
>
>I tried to read a text file in ADA which consists of string
>and integer, but I only know how to instantiate the
>package SEQUENTIAL_IO to read integer, could anyone tell
>me how to instantiate SEQUENTIAL_IO so that I can read
>read both text and integer? And please provide the exact
>syntax.
>Also, what should be the command which read a text file?
>GET, or READ?
>
In general, you should read text files with Text_IO. Sequential_IO and
Direct_IO are intended for use with binary files, i.e. no conversion is done
to and from ASCII. Use Get for both your string and your integer. I think
you should read whatever book you're using carefully in the IO package section.
Mike Feldman
------------------------------------------------------------------------
Michael B. Feldman
co-chair, SIGAda Education Committee
Professor, Dept. of Electrical Engineering and Computer Science
School of Engineering and Applied Science
The George Washington University
Washington, DC 20052 USA
(202) 994-5253 (voice)
(202) 994-5296 (fax)
mfeldman@seas.gwu.edu (Internet)
"The most important thing is to be sincere,
and once you've learned how to fake that, you've got it made."
-- old show-business adage
------------------------------------------------------------------------
prev parent reply other threads:[~1993-03-08 3:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1993-03-07 22:27 how to read a text file? Samson S. W. Chan
1993-03-08 3:49 ` Michael Feldman [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox