ProvideX V8.20 > Language Reference > 2. Directives
226
OBTAIN Directive
             Get Hidden Terminal Input
Format
OBTAIN (chan[,fileopt])varlist
Where:
chan
Channel or logical file number of a terminal or indexed file from which
to obtain input.
Supported file options (see also, File Options, p.808):
fileopt
ERR=stmtref Error transfer
HLP=string$ Help message identifier
LEN=num Limit on input size
SIZ=num Number of characters to read (number of screen columns)
TBL=stmtref Data translation table
TIM=num Maximum time-out value in integer seconds
Comma-separated list of variables, literals, mnemonics, IOL= options,
varlist
and/or location functions '@(...)'.
Description
Use the OBTAIN directive to issue prompts to terminal devices and to process
responses (the user's input). The file reference should be to a terminal, but you can
use an indexed file. If you include literals or expressions in this directive, ProvideX
treats them as prompts for the user.
You can include format masks, as in A$=STR(.01:"0.00"). If you omit the format
mask for a numeric in the OBTAIN statement, 'DP' Decimal Point Symbol and 'TH'
Thousands Separator system parameters are ignored for European decimal settings.
Note: OBTAIN performs in the same way as the INPUT directive except that the user's
input is not echoed on the screen. This can be useful for such applications as
passwords.
See Also
ACCEPT Read Single Keystroke, p.28
INPUT Get Input from Terminal, p.159
'ME' Mnemonic, p.618
'BI' Mnemonic, p.588
Data Format Masks , p.811
Example
0010 OBTAIN 'CS',@(5,5),"Enter your password:",C$
RUN
Enter your password:
The password, "TEST" in this example, is not echoed, but C$ will return the value.
-:?C$
TEST