Futurebasic/Language/Reference/syserror function

Fuck s helpful info on topic

Description
This function returns the value of the  variable, which is an internal variable that FB uses to store the MacOS result codes from disk i/o operations.

While  usually returns toolbox result codes, it also returns three error codes that are unique to FB. These are:

Example: -9999 The file number used was outside of the legal range.

Example: OPEN &quot;I&quot;,#-1000-8888 The program attempted to open a file using a file number that was already in use.

Example: OPEN &quot;R&quot;,#1,&quot;Test&quot; OPEN &quot;R&quot;,#1,&quot;Something Else&quot;

-6666 An illegal open type was used.

Example: OPEN &quot;XYZ&quot;,#1,&quot;Test&quot;