165
The command GET_FILE_ERROR returns the error code, which is a number that indicates
the result of the last file manipulation. A value other than 0 indicates error.
GET_FILE_ERROR
Purpose To get the error code of the previous file manipulation command.
Syntax A% = GET_FILE_ERROR
Remarks “A%” is an integer variable to be assigned to the result.
If there is no error, it returns 0.
If it returns a value other than 0, possible error code and its interpretation
will be listed as follows.
10 No free memory for file extension.
For other types of error, e.g. invalid file ID, it will cause a run-time error.
Example
…
ADD_RECORD(1, Data$)
IF (GET_FILE_ERROR = 10) THEN
ErrorMessage$ = “No free file space.”
END IF