HELP INQUIRE — VMS 4.6
Requests interactive assignment of a value for a local or global
symbol during the execution of a command procedure.
Format:
INQUIRE symbol-name [prompt-string]
Additional information available:
ParametersCommand QualifiersExamples
Parameters
symbol-name Specifies a 1- through 255-alphanumeric character symbol to be given a value. prompt-string Specifies the prompt to be displayed at the terminal when the INQUIRE command is executed. String values are automatically converted to uppercase. Also, any leading and trailing spaces and tabs are removed, and multiple spaces and tabs between characters are compressed to a single space. To prohibit conversion to uppercase and retain space and tab characters, place quotation marks around the string. To use quotation marks in a prompt-string, enclose the entire string in quotation marks and use a double set of quotation marks within the string. If the prompt string contains an at sign character (@), enclose the string in quotation marks. When the system displays the prompt string at the terminal, it generally places a colon (:) and a space at the end of the string. (See the /PUNCTUATION qualifier.) If you do not specify a prompt string, the command interpreter uses the symbol name to prompt for a value.
Command Qualifiers
Additional information available:
/GLOBAL
/GLOBAL Specifies that the symbol be placed in the global symbol table. If you do not specify the /GLOBAL qualifier, the symbol is placed in the local symbol table.
/LOCAL
/LOCAL (default) Specifies that the symbol be placed in the local symbol table for the current command procedure.
/PUNCTUATION
/PUNCTUATION (default) /NOPUNCTUATION Controls whether or not a colon (:) and a space follow the prompt when it is displayed on the terminal. If you wish to suppress the colon and space, specify /NOPUNCTUATION.
Examples
1. $ INQUIRE CHECK "Enter Y[ES] to continue"
$ IF .NOT. CHECK THEN EXIT
The INQUIRE command displays the following prompting message at the
terminal:
Enter Y[ES] to continue:
The INQUIRE command prompts for a value, which is assigned to the
symbol CHECK. The IF command tests the value assigned to the symbol
CHECK. If the value assigned to CHECK is true (that is, an odd
numeric value, a character string that begins with a T, t, Y, or y,
or an odd numeric character string), the procedure continues
executing.
If the value assigned to CHECK is false (that is, an even numeric
value, a character string that begins with any letter except T, t,
Y, or y, or an even numeric character string), the procedure exits.
2. $ INQUIRE COUNT
$ IF COUNT .GT. 10 THEN GOTO SKIP
.
.
.
$ SKIP:
The INQUIRE command prompts for a count with the message:
COUNT:
Then the command procedure uses the value of the symbol COUNT to
determine whether to execute the next sequence of commands or to
transfer control to the line labeled SKIP.
3. $ IF P1 .EQS. "" THEN INQUIRE P1 "FILE NAME"
$ FORTRAN 'P1'
The IF command checks whether a parameter was passed to the command
procedure by checking if the symbol P1 is null; if it is, it means
that no parameter was specified, and the INQUIRE command is issued
to prompt for the parameter. If P1 was specified, the INQUIRE
command is not executed, and the FORTRAN command compiles the name
of the file specified as a parameter.