stdin/stdout_(re)

Fri, 2 May 1997 03:02:05 +0200 (MET DST)


According to Andreas Bauer:
> 
> can you please explain me how to use the stdin/stdout with gpc?
> The compiler does not seem to know these.

The "legal" way is to use ordinary `read', `readln', `write', and
`writeln' operations.  Note that `read' returns a space at the end
of a line, not a chr ( 10 ) or chr ( 13 ), and that `eoln ( Input )'
is `true' instead.

> It *does* work when stdin/stdout are connected to the terminal, but  
> when using pipes it seems not to work.

It should work except that the first char is "eaten" by the GPC RTL.
See the thread "[BUG] GPC - a char killer?" on 7. and 11. April in
this list for reasons and a workaround.

Hope this helps,

    Peter

  Dipl.-Phys. Peter Gerwinski, Essen, Germany, free physicist and programmer
peter.gerwinski@uni-essen.de - http://home.pages.de/~peter.gerwinski/ [970201]
 maintainer GNU Pascal [970420] - http://home.pages.de/~gnu-pascal/ [970125]


Peter Gerwinski (peter@agnes.dida.physik.uni-essen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es