Commands and Statements |
ON ... GOSUB
The ON ... GOSUB statement transfers program control to one or one of a set of subroutines.The line numbers of the first lines of these subroutines follow sequen- tially, separated by commas. If the expression evaluates to 3, control transfers to the third line number following GOSUB.
ON expression GOSUB line number [,Iine number] ...
10 INPUT A
20 ON A GOSUB 200,300
ON ... GOTO
The ON ... GOTO statement transfers program control to one or one of a set of line numbers. The expression X is evaluated and control is transferred to the "nth" line number following the line containing the ON ...GOTO instruction. If the expression evaluates to 3, control transfers to the third line number following GOSUB.
ON expression GOTO line number [,Iine number] ...
10 INPUT A
20 ON A GOTO 500,510,520
OPEN
The OPEN statement makes an
Only six files may be open at one time. Note that SAVE, LOAD, DSKF; DIR and MERGE all require a file, so a maximum of five files may be open before they are executed.
OPEN type, [I] file number, filename
where type is a string expression equal to "0", "I" or "R". In the example below, the file SYSLIB is opened as a random I/O file, with number 4.
OPEN "R" ,#4, "SYSLlB"