INPUTN Verb
Syntax
INPUTN col,row,omask$,imask$,flags$,restore,val{:(verifyoptions)}
Description
The INPUTN verb allows numeric input from the keyboard. Its operation is similar to the INPUT verb but it has additional editing and display capabilities.
Parameter |
Description |
---|---|
col |
Column position of the input region. |
row |
Row position of the input region. |
omask$ |
Output mask. |
imask$ |
Input mask. If the parameter is null, an input mask is generated automatically by copying only "#", "0", and "." from omask$, and by adding a leading "-", if any sign indicator appears in omask$. |
flags$ |
Input flags, as described below. |
restore |
Restore value. |
val |
Default value. |
verifyoptions |
Verification options. |
The cursor is placed at col,row, and val
is displayed in the input region using imask$.
On entry of numeric data (digits, ".", "+", and "-"),
the initial value is replaced with the new data. With each numeric keystroke,
the value is calculated and redisplayed using imask$.
The "+" and "-" symbols, entered at any time, determine
the sign of the new value for a calculator-style numeric entry.
The backspace key may be used to correct typing errors. When the restore
command is seen (see STBL("!EDIT")
in the User's Reference Guide),
the value of restore is displayed.
This value may be accepted, or it may be discarded to continue editing.
If the first character entered is nonnumeric, it is displayed in the left-most
position of the input region, and input proceeds as in INPUTE. Also, if
an attempt is made to edit the displayed value using any of the editing
commands listed in !EDIT (except backspace and restore), the current display
will be edited with the functionality of INPUTE.
After completion of the entry, the entered value is passed through numeric
input verification (see the Numeric
Input Verification section in the User's
Reference Guide), saved in val,
and displayed using omask$. If
no entry occurs, val remains
unchanged, and its original value is displayed using omask$.
The following bits of flags$ affect
the behavior of INPUTN:
Flag Bit |
Effect on Input if Bit is Set |
---|---|
$01$ |
Enters digits from the right-most position. Normally, input begins to the left of the decimal point in the input mask and proceeds past the decimal only when "." is entered. |
$02$ |
Copies commas and numeric characters when generating the edit mask from mask$. |
$04$ |
Accepts the decimal point replacement character for data entry defined by SETOPTS(6,1). |
$80$ |
Causes the system to beep upon entry of invalid data. |
If flags$ is null, the value in STBL("!IRULES") will be used as a default.