Re: [fpc-pascal] Test file mode question

2016-10-25 Thread Bart
On 10/25/16, Rolf Grunsky wrote: > If (SFile.Mode = fmClosed) Then Rewrite(SFile); Maybe cast SFile to TextRec(SFile)? Bart ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

[fpc-pascal] Test file mode question

2016-10-25 Thread Rolf Grunsky
I am trying to put together a short program to build a script file. I declare the file as: Uses sysutils; {$H+I-} Var SFile : Text; I then assign a name to the file : Assign(SFile, SName); Now, I only want to create the file if some conditions are met. Since this is in a loop I thought I cou