FKey Error Cond

From BR Wiki
Revision as of 23:21, 23 January 2013 by Laura (talk | contribs) (→‎Syntax)
Jump to navigation Jump to search

The FNKEY error condition is available for use only with the ON error statement. It cannot be used at the end of a program line or in the Exit statement.

Syntax

Parameters

The "numeric expression" portion of the FNKEY error condition is a numeric expression that evaluates to a number from 1 to 10. The value of the num-expr determines which function key, when pressed, will activate the ON statement's GOTO.

Error Traps:

During program processing (the status line says "RUN"), FNKEY traps the pressing of a function key which is specified by the "num-expr" parameter.

Business Rules tests for the pressing of function keys before execution of each line number. Multiple uses of the ON FNKEY statement do not impact program performance.

FNKEY has no effect during other operation modes such as INPUT or SELECT (see the CMDKEY function for information about trapping function key selections during these modes). If FNKEY is set to SYSTEM, the value of ERR will be set to 1. If FNKEY is not set and the operator presses a function key during processing, it will be ignored.

When FNKEY is set to either SYSTEM or GOTO and the specified function key is pressed, the keyboard buffer will be cleared up to the pressing of that key in the same manner that pressing Ctrl-A clears the buffer.