ON( ) Function Example

The following example uses ON( ) to display ON ERROR and ON KEY LABEL settings.

ON ERROR DO errorhand
ON KEY LABEL CTRL+F2 WAIT WINDOW 'You pressed ^F2'
ON KEY LABEL ALT+Z DISPLAY MEMORY
CLEAR
? ON('ERROR')  && Displays DO errorhand
? ON('KEY', 'CTRL+F2')  && Displays WAIT WINDOW 'You pressed ^F2'
? ON('KEY', 'ALT+Z')  && Displays DISPLAY MEMORY
ON ERROR
ON KEY LABEL CTRL+F2
ON KEY LABEL ALT+Z