PROMPT Command
Displays a message to the user and waits for the user to respond.
Syntax
PROMPT {promptText} {(options}
Syntax Elements
promptText The text with which to prompt the user. This can include literal text and control sequences.
Options
R Allows the prompt text to be captured when performed by a DataBasic program (see PERFORM statement).
If a TCL macro containing a PROMPT statement is performed by a DataBasic program, the prompt text is not normally captured. The R option allows you to capture this text for test purposes. Note, however, that this should be used with care because no prompt will be displayed but the program will still wait for a response.
VmvModeSpecifies which set of video codes to use (to simplify MultiValue migration); refer to the DISPLAY command for the modes available.
Restrictions
PROMPT is intended for use in TCL Macros only.
Using PROMPT after a select deletes the active list.
Responses
The user must respond by entering C
(continue) or Q
(quit). If Q
is entered, none of the subsequent commands are executed.
Control Sequences
Control Sequence | Effect |
---|---|
@(column{,line}) |
Positions cursor at the specified screen coordinates. Both parameters must be integers greater than or equal to 0; if greater than the current maximum (set by the most recent execution of the TERM command), the cursor is placed in the right-most column or bottom row as appropriate. If row is omitted, the cursor remains on the current line. |
@(code) | Generates an extended cursor addressing or video effects code. The effects of these codes depends on the MultiValue video mode, selected with the V option (default, Reality). All extended cursor addressing and video effects codes are negative integers. Refer to the DataBasic @ function for details of the codes available in Reality mode. The @ compatibility option lists codes for other modes. |
@({count}n) | Generates count carriage returns. If count is omitted, only one carriage return is generated. |
@({count}b) | Generates count bell characters. If count is omitted, only one bell is generated. |
@(O{.}code) | Generates the character with the specified ASCII code. If code is preceded by a dot (.), it is interpreted as hexadecimal; otherwise it is interpreted as decimal. Valid values are from 0 to 254 decimal (x'00' to x'FE' hex). |
`command` | Substitutes the result of executing command, which must be enclosed in grave accents (reverse single quotes). |
Example
Off macro
001 n
002 prompt Are you sure you want to log off?
003 off
Prompts the user before the OFF command is run.
See Also
DISPLAY command, COMMENT command, TCL Macros.