The ckrange utility prompts a user for an integer between
a specified range and determines whether this response is valid. It defines, among other things, a prompt message whose response should be an integer in the range specified, text for help and error messages, and a default value (which is returned if the user responds with a RETURN).
This command also defines a range for valid input. If either the lower or upper limit is left undefined, then the range is bounded on only one end.
All messages are limited in length to 79 characters and are formatted automatically. Tabs and newlines are removed after a single whitespace character in a message definition, but spaces are not removed. When a tilde is placed at the beginning or end of a message definition, the default text will be inserted at that point, allowing both custom text and the default text to be displayed.
If the prompt, help or error message is not defined, the default message (as defined under EXAMPLES) is displayed.
Three visual tool modules are linked to the ckrange command. They are errange (which formats and displays an error message on the standard output), helprange (which formats and displays a help message on the standard output), and valrange (which validates a response). These modules should be used in conjunction with Framed Access Command Environment (FACE) objects. In this instance, the FACE object defines the prompt.
Note: Negative "input" arguments confuse getopt in valrange. By inserting a "-" before the argument, getopt processing will stop. See getopt(1) and intro(1) about getopt
parameter handling. getopt is used to parse positional parameters and to check for legal options.
|