
Chapter 14. Statement Reference
272
• If a keystroke trap occurs, the Interpreter automatically executes
KEY OFF state-
ment for the pressed function key before passing control to an event-handling rou-
tine specified by label in ON KEY...GOSUB statement. This prevents a same
event-handling routine from becoming invoked again by pressing a same function
key during execution of the routine until the current event-handling routine is com-
pleted by issuing a
RETURN statement.
When control returns from the event-handling routine by a
RETURN statement,
the Interpreter automatically executes
KEY ON statement.
If it is not necessary to resume keystroke trapping, you describe a
KEY OFF
statement in the event-handling routine.
• If you issue more than one
ON KEY...GOSUB statement specifying a same key-
number
, the last statement takes effect.
• You can nest
GOSUB statements to a maximum of 10 levels.
• When using the
ON KEY...GOSUB statement together with block-structured state-
ments (
DEF FN...END DEF, FOR...NEXT, FUNCTION...END FUNCTION,
IF...THEN...ELSE...END IF, SELECT...CASE...END SELECT, SUB...END SUB
and WHILE...WEND), you can nest them to a maximum of 30 levels.
• In the BHT-6000/BHT-6500/BHT-7000 with 26-key pad/BHT-7500, specifying 32
to keynumber will be ignored.
Syntax errors:
Run-time errors:
Reference:
Error code and message Meaning
error 71: Syntax error • label has not been defined.
•
label is missing.
•
keynumber is not enclosed in
parentheses ( ).
Error code Meaning
05h
Parameter out of the range
(
keynumber is out of the range.)
07h
Insufficient memory space
(The program nesting by
GOSUB statements is too deep.)
Statements:
KEY, KEY OFF, and KEY ON
Kommentare zu diesen Handbüchern