xcall ANYCN, cngctl, whatno
ANYCN.SBR is used in many AlphaAccounting-derived programs to ask if the operator wants to make any changes before updating a record, and if so, which field number. The A-Shell implementation of ANYCN is pretty faithful to the original, except for a couple of extensions: support of foreign languages via the SBRMSG.lan file, and support of function key response codes. For convenience a complete summary of the functionality follows.
Parameters
cngctl [in/out]
Controls variations of the function as described below:
Value |
Meaning |
1 |
Display the message "Any Change?" on line 24; allow the input of affirmative, negative, or a number. If an affirmative response given, the operator is then prompted for "What Number?" If a number is entered, it is treated as if an affirmative response was first given and then the number was entered at the "What Number?" prompt. |
2 |
Same as for 1, except that there is no option to input a number – only negative and affirmative responses are allowed. |
3 |
Display the message "INVALID SELECTION" and then proceed to prompt as if CNGCTL was set to 1. |
On return from the routine, cngctl will be set to –1 if escape was entered, 0 for a negative response and 1 for an affirmative response.
whatno [out]
If cngctl is one, whatno will be set to the number entered. If a function key is entered and the <tdv>.IFX function key translation file has been set up using the INFLD standard for function keys (i.e. F1 = (Ctrl+G)+(Ctrl+A), F2 = (Ctrl+G)+(Ctrl+B), etc.) then the negative of the function key number will be returned in whatno (e.g. F1 returns –1, F2 returns –2, etc.).