[fpc-pascal] redirecting stdout
pascaldragon at googlemail.com
Sun Jul 18 13:28:42 CEST 2010
You can use WriteStr to "Writeln" to a String (needs 2.4.0 and above).
WriteStr(s, 'Hello World');
Also you can try unit StreamIO (in fcl-base) which allows you to use
Streams as TextFiles (you can also look at it to learn how to implement
your own text driver).
s := TStringStream.Create;
Writeln(f, 'Hello World');
More information about the fpc-pascal