Assigns an output line width to a file opened using the FileOpen function.
Public Sub FileWidth( _ FileNumber As Integer, _ RecordWidth As Integer _ )
Exception type | Error number | Condition |
---|---|---|
52 | FileNumber does not exist. | |
54 | File mode is invalid. |
This example uses the FileWidth function to set the output line width for a file.
Dim i As Integer FileOpen(1, "TESTFILE", OpenMode.Output) ' Open file for output. FileWidth(1, 5) ' Set output line width to 5. For i = 0 To 9 ' Loop 10 times. Print(1, Chr(48 + I)) ' Prints five characters per line. Next FileClose(1) ' Close file.
FileOpen Function | Print, PrintLine Functions |