159
INPUT Directive
Get Input from Terminal
Format
INPUT [EDIT] ([chan][,fileopt])varlist
Where:
chan
Channel or logical file number of the file from which to get terminal input.
fileopt
ERR=stmtref Error transfer
HLP=string$ Help message identifier
IND=num Position cursor to specified column number.
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.
When screen positions are tight, you can combine the LEN= and SIZ=
options to have ProvideX supply a scrolling input field. For example, to
allow a user to enter 60 characters in a field where you only have room for
30 on the screen: INPUT (0,LEN=60,SIZ=30)"Name....:",N$
Comma-separated list of variables, literals, Mnemonics, IOL= options,
varlist
data being received.
Description
Use the INPUT directive to issue prompts to and receive input from a terminal
device. You would normally use the logical file number to refer to a terminal. Input
from the user is stored in a variable specified. ProvideX treats any literals or
expressions included in the statement as prompts. When a numeric variable is
specified, numeric data must be received. Non-numeric input in response to a
numeric variable (other than commas and decimals) will cause an Error #26:
Variable type invalid.
If you use the EDIT clause, the current values for the variables are loaded into the input
buffer so that the user can edit them.
Use a format mask with the INPUT directive to control the input. To do this, append
a colon and the mask to the given variable in varlist. If you omit a format mask for a
Separator system parameters are ignored for European decimal settings.
If an INPUT EDIT statement has both a format mask and a validation list, make sure
that the validation list contains only entries that are possible. For example, if the
format mask indicates that the input value must be a single character, do not use a
null ("") value in the validation list.
Instead, valid input for "no value" could be a blank / space in this instance, as in:
0030 INPUT EDIT (0,ERR=0030)@(10,10),VAR$:"A":("Y"=0040,"N"=0050,""=0060)