On Fri, Oct 23, 2009 at 12:21 PM, Graeme Geldenhuys
<graemeg.li...@gmail.com> wrote:

> I can view the resulting output.txt file with Midnight Commander
> (Linux console file manager), but if I try and open that file with
> Gnome gEdit or Lazarus IDE, it says the file does not look like a text
> file and refuses to open it. :-(

var
  AOut: TFileStream;
  s: String;
begin
  s:= '1234';
  AOut:= TFileStream.Create('C:\temp\aa.txt',fmCreate or fmOpenWrite);
  AOut.WriteBuffer(s[1], length(s));
  AOut.Free;

Strange, that works for me under Windows. I get a 4 byte text file
containing '1234'.

Regards,


Gerard.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to