[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
##############################################################################
###+--------+#################################################################
#+-| FILTER |-----------------------------------------+#######################
#| +--------+ The FILTER clause of the GET subcommand |#######################
#| filters each key as it is input |#######################
#+----------------------------------------------------+#######################
##############################################################################
##############################################################################
#+--| Syntax |------------------------------------------------------+#########
#| @<Int-exp,Int-exp> GET <C-exp> [PICTURE <C-exp> |#########
#| || FUNCTION <C-exp>] [VALID <L-exp>] [FILTER <Uint-exp>] |#########
#| [ ID <Uint-exp> ] |#########
#+------------------------------------------------------------------+#########
##############################################################################
##############################################################################
#######+---| Description |--------------------------------------------+#######
#######| The FILTER clause of the GET subcommand filters each key as |#######
#######| it is input. The FILTER clause specifies a UINT expression |#######
#######| that is evaluated for every key pressed. The UINT expression |#######
#######| may be a function. Filters increase control over GET input. |#######
#######| The FILTER can be used to: |#######
#######| |#######
#######| * program special keys. |#######
#######| * trap defined keys by stuffing the keyboard. |#######
#######| * implement context-sensitive help. |#######
#######| * implement user-defined templates. |#######
#######| |#######
#######| If a filter function is specified with the GET, e.g., |#######
#######| |#######
#######| @ x,y GET a FILTER my_filter_function() |#######
#######| |#######
#######| Then the function must return a key to the READ. A filter |#######
#######| function returning 0 tells the READ to ignore the key and |#######
#######| to get another keystroke. |#######
#######+--------------------------------------------------------------+#######
##############################################################################
##############################################################################
#####+----------------------------| NOTE: |-----------------------------+#####
#####| If a variable used in a GET subcommand is a local variable, then |#####
#####| you must be sure the READ command is activated within the |#####
#####| scope of the local variable. |#####
#####+------------------------------------------------------------------+#####
##############################################################################
##############################################################################
#########+--| Example 1 |-------------------------------------------+#########
#########| * A GET may specify a keyboard filter routine. |#########
#########| |#########
#########| @ row()+1,col() GET nm->first FILTER help() |#########
#########+----------------------------------------------------------+#########
##############################################################################
See Also:
@...GET
READ
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson