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-30 21:25:41 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!howland.reston.ans.net!gatech!newsxfer.itd.umich.edu!zip.eecs.umich.edu!newshost.marcam.com!charnel.ecst.csuchico.edu!olivea!news.hal.COM!halsoft.com!netcomsv!telesoft!kst From: kst@alsys.com (Keith Thompson) Subject: Re: Help with gnat IO Message-ID: Originator: kst@pulsar Sender: news@alsys.com (USENET News Admin @flash) Organization: Alsys, San Diego, CA, USA References: <3bces8$500@scratchy.reed.edu> <3bg8je$hsr@gnat.cs.nyu.edu> Date: Thu, 1 Dec 1994 03:10:51 GMT Date: 1994-12-01T03:10:51+00:00 List-Id: In <3bg8je$hsr@gnat.cs.nyu.edu> dewar@cs.nyu.edu (Robert Dewar) writes: > There is no Get_String function (was there really a procedure with that > name in Ada 80??) Yes. > There are however versions of get that get from a string, > which is presumably what you are looking for. I don't think that's what he was looking for. In fact, Ada 80's Text_IO has two overloaded Get_String functions (not procedures): function GET_STRING(FILE: in IN_FILE) return STRING; function GET_STRING return STRING; Perform GET operations on the specified in file, skipping any leading blanks (that is, spaces, tabulation characters or line marks) and returns as result the next sequence of characters up to (and not including) a blank. The default file is the current input file. Likewise, the Get_Line routines were also functions returning STRING; they now return the string and its 'Last in OUT parameters. Out of curiosity, why was this change made? The current version of Get_Line makes it difficult to read arbitrarily long lines; you have to decide the maximum length before reading the line. (At least it behaves gracefully if the line is longer than the string you provide.) It looks like GET_STRING would have been a handy thing to have in some cases, but perhaps a bit too specialized to include in the language; it shouldn't be too hard to implement it on top of the existing routines. > I posted this just because I thought people would be entertained at the > idea of an Ada beginner somehow getting hold of the July 1980 version of > the RM! Perhaps we should have burnt all the copies :-) You can have my 1980 RM (and 1979 RM and rationale) when you pry them ... you know the rest. 8-)} -- Keith Thompson (The_Other_Keith) kst@alsys.com TeleSoft^H^H^H^H^H^H^H^H Alsys, Inc. 10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2718 /user/kst/.signature: I/O error (core dumped)