Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!talcott!harvard!seismo!brl-tgr!tgr!cottrell@nbs-vms.ARPA From: cottrell@nbs-vms.ARPA Newsgroups: net.lang.c Subject: Pascal IO Message-ID: <8630@brl-tgr.ARPA> Date: Mon, 25-Feb-85 16:48:23 EST Article-I.D.: brl-tgr.8630 Posted: Mon Feb 25 16:48:23 1985 Date-Received: Wed, 27-Feb-85 21:16:50 EST Sender: news@brl-tgr.ARPA Lines: 37 /* In article <2793@ncsu.UUCP> mauney@ncsu.UUCP (Jon Mauney) writes: > Of the many flaws in Pascal, ordinary I/O is not one. There is nothing > preventing good interactive execution of Pascal programs. > Jon Mauney mcnc!ncsu!mauney C.S. Dept, North Carolina State University Oh yeah? Here's what other people have to say. In article <732@ucbtopaz.CC.Berkeley.ARPA> mwm@ucbtopaz.UUCP >1) Getting read/write to work as expected on an interactive system. I've >heard that it can be done right while still maintaining the J&W semantics, >but have never seen it so done. Jack Jansen writes... > I'm sick and tired of delaying all my readln()s until I've > printed my next prompt, and checking each read() whether it should > be preceded by a readln() because there's still a newline > lingering in my buffer. > -- Darin Johnson writes... > When I started Pascal (UCSD P-System) I read the manual and discovered > that my I/O routines would not work just as pointed out. However, when > I actually ran the program to convince myself, it worked! Needless to > say, this is disconcerting to a freshman. This screwed up my programs > that assumed that readln, etc would read the first character of the next > line. Eventually I discovered that a space (EOLN converted) was left in > INPUT^, not the first character of the next line. This seemed to solve > the I/O "bugs", but you couldn't rely upon 'standard' Pascal manuals. > (somebody correct me if my interpretation is wrong, it has been awhile) What's wrong is having to ask EOLN or EOF for permission to call READ or READLN. IO is like kissing a girl; you don't ask, you just do it. Then check the status to see if you got anything. jim */