Hi!
You can use WriteStr to "Writeln" to a String (needs 2.4.0 and above).
Example:
var
s: String;
begin
WriteStr(s, 'Hello World');
end;
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).
Example:
var
f: TextFile;
s: TStringStream;
begin
s := TStringStream.Create;
AssignStream(f, s);
Rewrite(f);
Writeln(f, 'Hello World');
CloseFile(f);
s.Free;
end.
Regards,
Sven
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal