Interactive I/O in Pascal

Charlie Sorsby crs at lanl.ARPA
Sat Aug 2 05:38:31 AEST 1986

> As far as I know, the semantics of lazy I/O allow you to check for any
> possible input, printing prompts at any point.  This does not mean
> that Pascal's input parsing is as powerful as scanf, or that its
> output is as powerful as printf.  Obviously they are not.  Validating
> input, to make sure that the user hasn't typed something bogus, can
> require a bit more programming in Pascal than in C.  For example, in

Am I missing something?

As I understand it, printf and scanf are not considered part of the C
language but rather are part of the standard I/O package.  Is this also
true for writeln and readln in Pascal?  If so, it appears that standard
I/O packages are being compared rather than languages.  If not, perhaps the
comparisons are between apples and oranges.

Is there some characteristic of the Pascal language that prevents
construction of a Pascal standard I/O package that *would* be as powerful
as that of C?  Perhaps the existence of this characteristic is implicit in
this discussion and that is what I am missing.  If so, forgive my
ignorance.  (I realize that the lack of "separate compilation" in Pascal
precludes use of precompiled libraries of functions.)

Of course, there is also the fact that Pascal was intended as a teaching
language to consider.
Charlie Sorsby
				crs at

More information about the Comp.lang.c mailing list