This section describes some names which have special meanings in SNOBOL5.
FRETURN is used as a goto label to indicate that the function is returning and should signal failure in the context from which it was invoked. See the DEFINE() function for more information about user defined functions.
Although a statement can be given the label FRETURN, you cannot use a goto to branch to it. You can with a function call when the second argument of the DEFINE() function is 'FRETURN'.
NRETURN is used to indicate that the function is returning, but instead of returning the value of the natural variable with the same name as the function, the natural variable must contain a name (name data type) and this name is returned. This allows a function to be used as the subject of an assignment. See the DEFINE() function for more information about user defined functions.
The following illustrates a function F which returns the name of the first null valued element in the array.
The above prints the string "FIRST,SECOND".
Although a statement can be given the label NRETURN, you cannot use a goto to branch to it. You can with a function call when the second argument of the DEFINE() function is 'NRETURN'.
RETURN is used as a goto label to indicate that the function is returning, succeeds and returns the value of the natural variable with the same name as the function. See the DEFINE() function for more information about user defined functions.
Although a statement can be given the label RETURN, you cannot use a goto to branch to it. You can, however, with a function call when the second argument of the DEFINE() function is 'RETURN'.
INPUT is implicitly associated as an input variable for I/O unit number 5. See the INPUT() function for more information.
OUTPUT is implicitly associated as an output variable for I/O unit number 6. See the OUTPUT() function for more information.
PUNCH is implicitly associated as an output variable for I/O unit number 7. See the OUTPUT() function for more information.
END is a special label which signifies the end of the program. The "END" statement must be a "null" statement. A branch to the label END will terminate the program. The execution of the END statement will terminate the program. Either an upper case version or lower case version can be used which is an extension over what is in the Green book. However, the program must consistently use only one kind, either the lower or upper case version.
Prior Page, Next Page, First Page of the Oregon SNOBOL5 Reference