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-12-01 05:42:52 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!hookup!olivea!news.bu.edu!inmet!dsd!bobduff From: bobduff@dsd.camb.inmet.com (Bob Duff) Subject: Re: Help with gnat IO Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. References: <3bces8$500@scratchy.reed.edu> <3bg8je$hsr@gnat.cs.nyu.edu> Date: Thu, 1 Dec 1994 13:34:12 GMT Date: 1994-12-01T13:34:12+00:00 List-Id: In article <3bg8je$hsr@gnat.cs.nyu.edu>, Robert Dewar wrote: >There is no Get_String function (was there really a procedure with that >name in Ada 80??) There are however versions of get that get from a string, >which is presumably what you are looking for. No, I don't think that's what the original poster was looking for. In Ada 80, there was a *function* Get_String: function GET_STRING(FILE: in IN_FILE) return STRING; This would skip any blanks, then read nonblank characters, and return everything up to the next blank (a newline is considered a blank). E.g.: foo bar baz-bat Three calls to GET_STRING would return "foo", "bar", and "baz-bat". There was also a GET_LINE function, with similar behavior. Sounds pretty useful. It was probably deleted because it's a little bit tricky to implement. (Where do you buffer the characters, on a system like Unix, where you can't tell how long the line is until you've read it? The current language requires the programmer to answer that question.) Other interesting differences in Text_IO: In 1980, IN_FILE and OUT_FILE were two separate types; the mode business did not exist. In 1979, there were I/O procedures for the types INTEGER and FLOAT (instead of the generic versions). >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 :-) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :-) I have occasionally found pre-1983 versions useful during the design of Ada 9X. - Bob -- Bob Duff bobduff@inmet.com Oak Tree Software, Inc. Ada 9X Mapping/Revision Team (Intermetrics, Inc.)