basic.inputtrap.gosub Statement/BASIC Program

basic.inputtrap.gosub

Command basic.inputtrap.gosub Statement/BASIC Program
Applicable release versions: AP, R83
Category BASIC Program (486)
Description using the string.expression, it sets up an automatic "computed gosub" based on the next "input @" statements data. The position of the character in the string.expression corresponds to the position of the statement.label in the list. This acts as a "trap" which causes a "gosub" on all subsequent "input @" statements.

Upon "return" from a "gosub" specification, execution continues at the statement following the "inputtrap" command, not the "input @" statement.

"inputtrap" must precede its associated "input @" statement. Only one inputtrap statement can be active at any time.

"inputtrap off" cancels any previous "inputtrap" statement.
Syntax inputtrap string.expression gosub statement.label{ ,statement.label...}

inputtrap off
Options
Example
inputtrap "abcd" gosub 10,20,30,40
input @(5,5):x
stop
10 print "You entered a"
return
20 print "You entered b"
return
30 print "You entered c"
return
40 print "You entered d"
return
Purpose
Related basic.inputerr
basic.inputnull
basic.string.expression
basic.inputtrap.goto
basic.statements
basic.input@