[net.lang.c] Pascal IO

cottrell@nbs-vms.ARPA (02/26/85)

/*
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
*/

jack@boring.UUCP (02/27/85)

In article <8630@brl-tgr.ARPA> cottrell@nbs-vms.ARPA quotes a
part of my article to show that pascal I/O is braindamaged :
>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.
>> -- 
> 
Although I did write this, I think that it is *not* very decent to
try and prove your point by quoting things out of context.

What I said in the ~30 lines before this fragment is that it *is*
feasible to implement a good I/O system in pascal (usually referred
to as "lazy I/O"), and that I would like to see that implemented
by everyone.
I'm sick and tired of lazy implementors who don't implement
lazy I/O, and of lazy netters, who don't read all of a posting
before using pieces of it to "prove" *their* point.

Final-Statement: I like pascal-I/O, *AS LONG AS IT IS DECENTLY
	IMPLEMENTED*.
-- 
	Jack Jansen, {decvax|philabs|seismo}!mcvax!jack
Notice new, improved, faster address         ^^^^^

mauney@ncsu.UUCP (Jon Mauney) (02/27/85)

In the ever continuing debate on Pascal I/O (in the C newsgroup of course)
/*cottrell*/ quotes several complaints.  Most are resolved by using 
lazy I/O, as discussed earlier, but which is unfortunately not provided
in all implementations.  The other complaint is due to the total botch
that UCSD made in implementing "interactive" files in a non-standard
fashion.

Anyway, I like the analogy between I/O and kissing.  But remember,
trying to kiss without having a good idea of the status first is likely
to be a serious error.

-- 

*** REPLACE THIS LINE WITH YOUR SIGNATURE ***

Jon Mauney    mcnc!ncsu!mauney    C.S. Dept, North Carolina State University

jims@hcrvax.UUCP (Jim Sullivan) (02/28/85)

> 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

Who are these girls ? Can i meet one ?