|<< back to sysax.com Product page|
A file can be opened for reading or writing using the fileopen command. The predefined keywords read, write, and append are used to open the file for reading, writing, or appending. If the file is opened for writing, any existing file with the same name is deleted and a new file will be created. The name string specifies the name of the file to open. The
fileresult predefined status flag is set to the predefined constant
success if the command completed successfully.
Exhibit 10.1. Syntax of command for opening local files
fileopen <keywords: read, write, append>, <name string>;
Exhibit 10.2. Examples for using the command for opening local files
fileopen write, "error.txt"; #create or open a new file for writing fileopen append, "output.txt"; #open a file to append data to the end of the file