FOPEN

Syntax

Example

Description/Remarks

FOPEN file_number, "text_mode", "filename"

FOPEN 3,"R", " c:\data\122594.dat" assigns file " c:\data\122594.dat" to number 3 and opens the file in Read only mode. To access this file using other file commands, use 3 instead of the file name.

Does not return a value.

Accesses up to 10 files.

The file_number is an integer from 1 to 10 assigning a number to the file.

"text_mode" is a letter (enclosed in quotation marks) specifying in which mode to open the file. "R" is read only. " W" is write. "A" is append. When a file is opened in Write mode, it is reset (that is, if that file already existed, all previous data in the file will be lost.) Default is Read Only.

If the "filename" parameter contains only a file name without the drive letter and file path where that file exists, the program will attempt to find the specified file name in the directory from which the Data Entry module was launched.

See also FCLOSE, FREAD, and FWRITE.