Interactive I/O in Pascal

Charles Hedrick root at topaz.RUTGERS.EDU
Sat Aug 2 15:31:08 AEST 1986

Because Pascal does strong type-checking, it would be hard to write
anything like printf and scanf for it.  Indeed if writeln and readln
were not built into the compiler, you would not be able to define them
yourself.  A Pascal procedure must have a fixed number of arguments,
each of a definite type.  Thus the best you could do would be
  printint(int i);
  printreal(real r);
etc.  Unfortunately, I/O libraries are not something that can be
tacked on later.  I/O affects the definition of the language.  This is
one of the most serious problems with the languges in the Algol
tradition.  There is a tendency to think I/O is a detail unfit for
computer scientists, which can be left to the "standard prolog".

More information about the Comp.lang.c mailing list