A PROGRAM statement declares a program name and parameters, which are used by CHAIN statements.
A CHAIN statement transfers the control to another program and terminates the program itself.
The naming rule for Program_Name is same as that for numeric variables.
PROGRAM Program_Name(variable, variable，variable，･･･ ，variable)
When arrays are written as parameters, they are written followed by parentheses and commas of the number of the dimension minus 1.
A is a 1-dimensional array, B 2-dimensional, C 3-dimensional.
A PROGRAM statement must be written in the first line of a program.
When a CHAIN statement has launched this program, the values that the CHAIN statement has handed over are substituted for the parameters.
A PROGRAM statement can be used for a program that is not necessarily written by BASIC to launch the program and hand over some parameters.
extype4301 Parameter mismatch
extype4302 Mismatched dimension of array parameter
File_Name is a string expression whose value shall be the name of the file that stores a BASIC program.
CHAIN File_Name WITH ( expression，expression，…，expression )
The values of expressions written in the WITH-clause shall be the parameters for the PROGRAM statement.
Expressions are numerical expressions, string expressions or arrays.
Arrays are written without parentheses.
CHAIN "A:\ABC.BAS" WITH (12,"Quiz")
CHAIN "A:\SAMPLE.BAS" WITH(A,B,C)
Although the program name that is written in the PROGRAM statement can differ from the name of the file which stores the program, the argument of a CHAIN statement is not a program name but a file name.
Refer to command line parameters