Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!brl-adm!adm!kvancamp@ARDEC.arpa From: kvancamp@ARDEC.arpa Newsgroups: comp.lang.pascal Subject: Re: TURBO Pascal READ Message-ID: <7098@brl-adm.ARPA> Date: Fri, 24-Apr-87 11:44:01 EST Article-I.D.: brl-adm.7098 Posted: Fri Apr 24 11:44:01 1987 Date-Received: Sat, 25-Apr-87 19:26:00 EST Sender: news@brl-adm.ARPA Lines: 16 >I don't care what >anybody says about buffering, programs shouldn't behave >that way. This kludgy MS-DOS buffering makes life real interesting >when you are inheriting stdin and stdin has been redirected from >a file. I have to agree with this remark. But then, Pascal never had any decent I/O to begin with -- just look at its unforgiving reads of reals. That's why I (and most people I know who need to read numeric data in Pascal) use my own general-purpose input routine that reads a line of data as a string (using readln, not read), then evaluates it byte-by-byte to decode the answer in a reasonable way. The one I use most is meant to read any number of reals, but is easily adapted to include chars. It's a simple routine, but if anyone would like a copy let me know. --Ken Van Camp