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,9b84a0d726430783 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-11-28 11:00:00 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!gumby!yale!not-for-mail From: griest-tom@cs.yale.edu (Tom Griest) Newsgroups: comp.lang.ada Subject: Re: Help with gnat IO Date: 28 Nov 1994 13:13:22 -0500 Organization: Yale University Computer Science Dept., New Haven, CT 06520-2158 Message-ID: <3bd6k2INNmc6@RA.DEPT.CS.YALE.EDU> References: <3bces8$500@scratchy.reed.edu> NNTP-Posting-Host: dept-gw.cs.yale.edu Date: 1994-11-28T13:13:22-05:00 List-Id: In article <3bces8$500@scratchy.reed.edu> yeung@bagpipe.reed.edu (Woodrow Yeung) writes: >Hi, > >I'm using gnat and am having trouble with the input/output routines. >First of all, how do I use the INTEGER_IO package? I get this error >message: >file "integer_io.ads" not found >but I see the INTEGER_IO package defined within the a-textio.ads file. >I want to be able to format my field width. > Is the a-textio.ads file in a directory specified by the ADA_INCLUDE_PATH environment variable? BTW, you should always say what host/target and compiler revision you are working with. >Secondly, in the Ada reference manual (July 1980) there is a function ^^^^^^^^^ >GET_STRING that reads a sequence of character up to the next white space. You're kidding right? You should sell this rev of the Ada manual to some collector and download the most recent version of the RM from the ajpo host. Make sure you get a 9X version. >This function does not exist in the gnat implementation. I want to do >this without writing my own routine. By using GET, I end up with >characters filling my string. Worse yet, I read too much data. My data >is composed of lines with fields delimited by whitespace. (I guess >GET_STRING got taken out of Ada before it was finalized.) Good guess. It is very difficult to assign unconstrained arrays to an object when you don't know what the size is. Of course there are work-arounds (like dynamic allocation or creating a new declarative scope) and this type of silly function now exists in several places in 9x. :-( Use procedure: Get_Line(STR,LINE_LEN); > >I would appreciate any help. By the way, where's all the traffic in >this newsgroup? Are people still using Ada? > Yes. -Tom