DarkBASIC Professional Help Wiki
Advertisement


Attempts to open the specified file for read-only operation.

If the file does not exist, or you do not have the correct access permissions to open the file then the command will fail silently.

If using the function form of this instruction, the function will return 1 if the file is open or 0 otherwise.

If using the command form of this instruction, you can check if the file was successfully opened by using the DATAFILE EXIST() function.




Syntax


OPEN DATAFILE TO READ FileID, Filename$
IsOpen = OPEN DATAFILE TO READ( FileID, Filename$ )

Advertisement