[fpc-pascal] Creating text files with TFileStream
Graeme Geldenhuys
graemeg.lists at gmail.com
Fri Oct 23 11:58:49 CEST 2009
Hi,
How do you create plain text file output with TFileStream? Or is
TFileStream reserved for binary output only?
I'm using TFileStream as follows;
// helper function to simply things
procedure writef(AText: string);
begin
AOut.WriteAnsiString(AText + LineEnding);
end;
where AOut is the TFileStream. But if I view the output file, it
"mostly" looks like text. Except that on each line in starts with some
random 2-3 characters.
Maybe TFileStream is not suited for plain text output, and I should
rather use the File type instead?
--
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the fpc-pascal
mailing list