< Futurebasic < Language < Reference

Fuck s helpful info on topic

SYSERROR

Syntax

systemErrorCode% = SYSERROR

Description

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

While SYSERROR 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 "I",#-1000-8888 The program attempted to open a file using a file number that was already in use.

Example: 
OPEN "R",#1,"Test"
OPEN "R",#1,"Something Else"

-6666 An illegal open type was used.

Example: 
OPEN "XYZ",#1,"Test"

See Also

SYSERROR statement; ERROR function; ON ERROR

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.