<PROMPT> [ HP DeskManager Customization ] MPE/iX 5.0 Documentation
HP DeskManager Customization
<PROMPT>
Syntax
<PROMPT { text} [default] [length [timeout]] >
where:
text quoted string
default quoted string
length numeric value in the range 1 to 256
timeout numeric value in the range 0 to 32767
Description
<PROMPT> allows you to prompt for information, and waits for user input.
The result of the function is whatever the user types. The text
parameter is the text of the prompt you want to appear on the screen.
The default is a question mark character (?). If text is a null string,
<PROMPT> automatically substitutes a question mark. The default
parameter represents a default response which will be used as the
function return if the user simply presses the Return key. If you do not
enter a value for the default parameter, a null string is returned by
default. The length parameter represents a maximum length for the user's
reply string. The default is 80 characters. The timeout parameter is
the time allowed for a reply in seconds before assuming that the Return
key has been pressed. After the allowed time has passed, the default
reply of zero (0) is taken. A value of zero represents an indefinite
wait.
Example
&SAVE r <MAKEQUOTED <PROMPT <VAR var> "Y" 1 5>>
This will prompt the user with the content of the variable var. If the
user presses Return in reply to the prompt the default answer will be
taken to be "Y". Only one character will be accepted as a reply from the
user and they will only be allowed five seconds to reply before the
prompt times out and the default reply is taken.
MPE/iX 5.0 Documentation