On Fri, Oct 23, 2009 at 12:25, Graeme Geldenhuys <graemeg.li...@gmail.com> wrote: > > Anyway, so now I'm back to square one - unable to create a plain text > file with TFileStream. :-( >
What about: TFileTextStream = class(TFileStream) constructor Create...; procedure WriteStr(const fmt: String; const args: array of const); procedure WriteStr(const s: String); end; procedure TFileTextStream.WriteStr(const fmt: String; const args: array of const); var temp: String; begin temp := Format(fmt, args); Write(temp[1], Length(temp)); end; procedure TFileTextStream.WriteStr(const s: String); begin WriteStr('%s', [s]); end; [written out of head, but it should work] -- Aleksa Todorovic - Lead Programmer Eipix Entertainment http://www.eipix.com/ _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal