* how to read a text file?
@ 1993-03-07 22:27 Samson S. W. Chan
1993-03-08 3:49 ` Michael Feldman
0 siblings, 1 reply; 2+ messages in thread
From: Samson S. W. Chan @ 1993-03-07 22:27 UTC (permalink / raw)
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?
Thanks.
Samson
UMCHA225@CCU.UMANITOBA.CA
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: how to read a text file?
1993-03-07 22:27 how to read a text file? Samson S. W. Chan
@ 1993-03-08 3:49 ` Michael Feldman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Feldman @ 1993-03-08 3:49 UTC (permalink / raw)
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
------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1993-03-08 3:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-03-07 22:27 how to read a text file? Samson S. W. Chan
1993-03-08 3:49 ` Michael Feldman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox