Eike Lange wrote:
Hello!
On Mon, Feb 16, 2004 at 11:52:57 -0800, Daniel Rudy wrote:
I'm trying to build a program under Unix, and I'm trying to use stdin and stdout to do this, but it keeps telling me that the symbols are not defined.
Try using:
uses GPC;
in your program.
I've tried stdin, stdout, standardinput, standardoutput, and used filenames such as 'stdin' and 'stdout'. How does one transfer information between stdin and stdout on unix systems through GPC?
program Foo (input, output); {...} begin Reset (input); ReWrite (output);
Omit those two lines. `Input' and `Output' are automatically provided (GPC also provides `StdErr' as an extension).
Only if you need other files to be connected to standard input/output, you can open them to '' or '-' (both mean the same), but that's only necessary in rather special circumstances.
while not EOF (input) do begin ReadLn (input, LineOfText); WriteLn (output, LineOfText) end; { ... } end.
Frank