Open ASCII File

Opens an ASCII file and returns a handle to that file in preparation for reading from or writing to it.

 

Input Arguments

 

0

File Path or Embedded File

ASCII File Path

The path to the ASCII file to open.

Return Arguments

 

1

Integer

ASCII File Handle

The handle to the opened ASCII file (for later referencing).

2

Integer

ASCII File Size (Lines)

The number of lines in the ASCII file.

Returned Status

 

SUCCESS

The file was opened successfully.

FAILURE

The file path is invalid or the referenced items could not be found.

 

Remarks

This command supports both absolute paths (ex. C:\test.xit) and relative paths (ex. .\test.xit). The file need not necessarily exist, since you may be creating a new file for writing.

Warning: Be careful to close every ASCII file that you open. Failing to close an open ASCII file could lead to unusual behavior with the ASCII commands until SA is restarted.