INQUIRE
TXT=`YES' ! define TXT to be a scalar text variable, default value YES
ASK: ! a label
INQUIRE `Enter: YES or NO >>' TXT
IF EQS(UCASE(TXT),`YES') THEN ! valid response
...
GOTO CONTINUE ! continue with the macro
ENDIF
IF EQS(UCASE(TXT),`NO') THEN ! valid response
...
GOTO CONTINUE ! continue with the macro
ENDIF
DISPLAY `Invalid response: expecting YES or NO'
GOTO ASK ! go back and inquire again
CONTINUE:
...
VECTOR X 1
SCALAR S
N = 5
INQUIRE `Enter a vector of length '//RCHAR(N)//` and a scalar >>' X S
The first command defines X to be a vector. The second command
defines S to be a scalar. The third command creates a scalar N
and assigns it the value 5. The INQUIRE command will write out
the prompt: Enter a vector of length 5 and a scalar >>
and wait for you to type in a vector set and a single value.
For example:
Enter a vector of length 5 and a scalar >> [0;1;3.5;-4;100] 10.3