SNOBOL4 file options ;CommentsOptions are specified by a slash (/) or minus sign (-), and one or more option letters. When the option requires a file name, an equal sign may be used between the option letter and file name for readability.
The source file contains your SNOBOL4 program. If no file is specified, CON: is assumed, and programs may be entered directly from the keyboard. Disk files will have extension .SNO supplied if none is specified.
The input file is associated with the variable INPUT when execution begins, as I/O unit 5. The default is CON:, your keyboard. Disk files will have extension .IN supplied if none is specified.
The listing file receives a listing of your program, with assigned statement numbers. Default is NUL:, that is, the listing is discarded. If /L appears without a file name, the source program file name will be used, with the extension changed to .LST.
The output file is associated with the variable OUTPUT when execution begins. This will be I/O unit 6. The default is CON:, which is usually your computer's display screen. Disk files will have extension .OUT supplied if none is specified. Execution dumps and tracings are sent to I/O unit 6.
A list of compilation and runtime error messages is written to this file. Default is CON:, that is, error messages are displayed on the screen. If /E appears without a file name, the source program file name will be used, with the extension changed to .ERR.
Other I/O files may be specified explicitly within the INPUT and OUTPUT functions, or on the command line with a unit number:
The specified file becomes associated with unit number n. N must be in integer between 1 and 16. If your program calls the INPUT or OUTPUT function without a file name, the file specified here will be used. This command line option merely makes an association; the file is not opened or created until the INPUT or OUTPUT function is called.
The remaining option switches alter SNOBOL4's behavior:
Termination messages and statistics are normally displayed via I/O unit 7 (SCREEN). The /B (batch) option instead directs them to I/O unit 6 (OUTPUT).
SNOBOL4 defaults to case-folding, making lower and upper case alphabetics equivalent for names and labels. Specifying this option inhibits case-folding: upper and lower case names are unique and distinct.
Sets the &DUMP keyword to 1. This is useful when you decide you want an end-of-run variable dump, and don't want to edit the source file.
Displays summary of options and Vanilla SNOBOL4 license information.
No execution after compilation.
Suppress column position information in error messages.
Displays additional product information.
Provide statistics upon termination.
&PARM ';' REM . INSTRUCTIONS
SNOBOL4 PROGwill compile and run a source program from file PROG.SNO, discard the listing, and run it with keyboard input and screen output. The command line:
SNOBOL4 CONVERT /I=DATA /O=RESULT /2=STYLE.DAT ;DRAFTwill run a program that presumably transforms input file DATA.IN to output file RESULT.OUT according to program option 'DRAFT'. I/O unit number 2 is associated with the file STYLE.DAT. The program can use the variable SCREEN to post error and status messages to the user, regardless of the reassignment of the input and output files.
SNOBOL4 SOURCE /I=SOURCE.SNO /L=OUTPUT /O=OUTPUT.LST /BCSsets up a "conventional" batch job, with source program and input data on file SOURCE.SNO (following the END statement), listing and program output to OUTPUT.LST, no case-folding, and end-of-run statistics.