back to Table of Contents


SafeOpenFile (function)

Will try to OPEN the given file using the next free number and the desired mode. On success it will also properly lock the file according to the mode. The opening is safe in that way, as it traps any errors and so avoids the abortion of the running program. In case of an error, the function does return a zero result, while the error code is saved into the globally SHARED variable appLastErr% for later reference.


SYNTAX:

fid% = SafeOpenFile% (mode$, file$)

INPUTS:

mode$ (STRING)

file$ (STRING)


RESULT:

fid% (INTEGER)


back to Table of Contents