Outstream and Carriage Returns

Alex_ChowAlex_Chow Member Posts: 5,063
I'm using Outstream to write to a file. The problem is when I use Outstream, it does not put Carriage return at the end of the line. I'm going to be writing multiple lines using Outstream.

I can't use the regular write, because it crashes if you write a very long string.

I've tried this:
ExportFileName.TEXTMODE(FALSE);
OutputText.ADDTEXT(sometext);
ExportFileName.CREATEOUTSTREAM(OutStr);
OutputText.WRITE(OutStr);
ExportFileName.write(LF);
ExportFileName.write(CR);
ExportFileName.CLOSE;

I also tried:
ExportFileName.TEXTMODE(FALSE);
OutputText.ADDTEXT(sometext);
ExportFileName.CREATEOUTSTREAM(OutStr);
OutputText.WRITE(OutStr);
ExportFileName.CLOSE;

ExportFileName.OPEN(NameofExportFile);
ExportFileName.TEXTMODE(FALSE);
ExportFileName.SEEK(ExportFileName.LEN);
ExportFileName.WRITE(LF);
ExportFileName.WRITE(CR);
ExportFileName.CLOSE;

I also tried:
ExportFileName.TEXTMODE(TRUE);
OutputText.ADDTEXT(sometext);
ExportFileName.CREATEOUTSTREAM(OutStr);
OutputText.WRITE(OutStr);
OutputText.WRITE('');

But nothing seem to work. Can anyone help? Thanks!

Answers

Sign In or Register to comment.