Pascal IO

cottrell at nbs-vms.ARPA cottrell at nbs-vms.ARPA
Tue Feb 26 07:48:23 AEST 1985


/*
In article <2793 at ncsu.UUCP> mauney at 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 at ucbtopaz.CC.Berkeley.ARPA> mwm at 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
*/



More information about the Comp.lang.c mailing list