Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!uwvax!rutgers!ames!ucbcad!ucbvax!computer-science.nottingham.ac.UK!rbh From: rbh@computer-science.nottingham.ac.UK (Roger Henry) Newsgroups: comp.lang.modula2 Subject: CanRead, Value and buffering. Message-ID: <8708200907.AA01992@cayuga.cs.rochester.edu> Date: Thu, 20-Aug-87 05:02:51 EDT Article-I.D.: cayuga.8708200907.AA01992 Posted: Thu Aug 20 05:02:51 1987 Date-Received: Sat, 22-Aug-87 09:35:42 EDT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 31 In message <648@bingvaxu.cc.binghamton.edu> Fred Sullivan writes: > I am trying to figure out how to implement procedures which don't > consume input, but may have to read far ahead, when the input is for > example a terminal or a pipeline. Good examples of what I mean are > Int.CanRead and Int.Value. Suppose the input is from a terminal, and > the person sitting at the terminal types an endless stream of spaces. > Should CanRead return FALSE after filling a buffer? Should Value halt > with an error after filling a buffer? I can't think of anything else > which would be reasonable, and I'm wondering what the proposers have in > mind here. The module BuffIn, in mailing 4 - yet to come, is designed for the implementation of procedures such as Int.Value. The specification implies that non-significant characters (spaces) may be consumed - so the endless stream of spaces will disappear. == Roger Henry == Address: Computer Science Department, University of Nottingham, Nottingham, NG7 2RD, England Telephone: Nottingham (0602 or +44 602) 506101 extension 2855 Electronic Mail Addresses: JANET: rbh@uk.ac.nott.cs ARPANET: rbh%cs.nott.ac.uk@UCL-CS.ARPA UUCP: rbh%cs.nott.ac.uk@ukc.uucp BITNET/EARN: rbh%NOTT.CS@AC.UK