*ASK, Par
, Query
, DVAL
Prompts the user to input a parameter value.
Par
An alphanumeric name used to identify the scalar parameter. See *SET for name restrictions.
Query
Text string to be displayed on the next line as the query (32 characters maximum). Characters having special meaning (such as $ ! ,) should not be included.
DVAL
Default value assigned to the parameter if the user issues a blank response. May be a number or character string (up to 8 characters enclosed in single quotes). If a default is not assigned, a blank response will delete the parameter.
Intended primarily for use in macros, the command prints the query (after
the word ENTER
) on the next line and waits
for a response. The response is read from the keyboard, except in batch mode
[/BATCH], when the response(s) must be the next-read input
line(s). The response may be a number, a character string (up to 8 characters
enclosed in single quotes), a parameter (numeric or character) or an expression
that evaluates to a number. The scalar parameter is then set to the response
value. For example, *ASK,NN,PARAMETER NN will set NN
to the value entered on the next line (after the prompt ENTER
PARAMETER NN
).
The *ASK command is not written to File.LOG,
but the responses are written there as follows: If *ASK is
contained in a macro, the response(s) (only) is written to File.LOG on
the line(s) following the macro name. If not contained in a macro, the response
is written to File.LOG as a parameter assignment (i.e., Par
=
"user-response").
If used within a do-loop that is executed interactively, *ASK should be contained in a macro. If not contained in a macro, *ASK will still query the user as intended, but the resulting log file will not reproduce the effects of the original run.
This command is valid in any processor.