[fpc-pascal] Pascal data flows
Michael Van Canneyt
michael at freepascal.org
Tue Apr 12 21:22:31 CEST 2005
On Tue, 12 Apr 2005, poof65 wrote:
> Hello mailing user.
> I'm a poor french guy who had a little problem ;-)
> I've read in a book that it was possible to redirect data flows to files.
>
> After doing my research on google, i've found a webpage talking about it.
> http://www.ictp.trieste.it/~manuals/programming/sun/pascal/lang_ref/ref_io.doc.html#327
>
> I've tried to make a little program with theses examples.
>
> program test (output);
> begin
> rewrite(output, 'test.txt');
> end.
That will not work. You'll need to do something like
program test (output);
begin
Close(output);
Assign(output, 'test.txt');
Rewrite(output);
Writeln('This should go to test.txt');
Close(output); // don't forget this.
end.
Here it works.
Michael.
More information about the fpc-pascal
mailing list