YESNO
example
 

YESNO K

Prompts the user for a decision to execute or skip a block of commands.

YESNO reads a YES or NO response from the terminal and changes the value of its argument, K, accordingly. YESNO sets K = 1 when the user responds YES, and K = 0 when the user responds NO. YESNO takes only one argument and it must be a stored constant.

Any response beginning with an upper or lower case Y is interpreted as a YES; any beginning with an upper or lower case N is interpreted as NO. All other responses are invalid. The user receives the message "Please answer Yes or No" and is given another opportunity to enter an acceptable answer. If a valid response is not obtained after five tries, a NO answer is assumed.

YESNO does not issue a prompt; it only reads a response. The Exec writer must use the NOTE command to prompt the user for a response.

Note: If you use YESNO while command language is turned off in the Session window (with the menu command Editor > Disable Command Language), an error message will be displayed and the Exec will stop.