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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,16b7f2c6a2ca54eb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-08 01:45:49 PST Newsgroups: comp.lang.ada Path: sparky!uunet!seas.gwu.edu!mfeldman From: mfeldman@seas.gwu.edu (Michael Feldman) Subject: Re: how to read a text file? Message-ID: <1993Mar8.034932.15763@seas.gwu.edu> Sender: news@seas.gwu.edu Organization: George Washington University References: Date: Mon, 8 Mar 1993 03:49:32 GMT Date: 1993-03-08T03:49:32+00:00 List-Id: In article 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 ------------------------------------------------------------------------