Syntax

handle = openfile ('path',0)

Arguments

handle: integer

path: text

Meaning

OPENFILE opens the text file named in path. If opening is successful, handle will assume a value of 0 or a positive value. If opening is not successful, handle takes the value -1. handle is then used as a unique identification for the corresponding text file. The second parameter (0) is reserved for future use.

Several text files can be opened in one adapl, provided a different handle variable is used for each text file. The variable doesn't need to be named handle per se, any other name is fine too.

The name of a text file may be preceded by a path. If there is no path in front of the text file, then the file is sought in the working directory.

See also

Handling text files