Standard Input Processing
Overview
To use the standard input program, _ninput.utl, the Toolkit environment and the keymap environment must be initialized:
CALL "_acu.utl"
REM " Specify the EUS Keymap
LET TRASH$=STBL("KEYMAP","(PROJECT)mykeys")
REM " Specify the ORDER processing Key Record:
CALL "_lkeymap.utl","ORDER"
_lkeymap.utl creates a global string with the name (!INPUT.TPL), which contains the processing fields required by _ninput.utl. This template format must be used to create a parameter string for the input program:
DIM INPUT$:STBL("!INPUT.TPL")
Input Template
The following fields are contained within the template structure:
Template fields must be referenced as template fields. Assuming the processing string is named INPUT$, the standard reference would be: INPUT.COL. For conciseness, the following table gives only the field reference.
Field |
Description |
COL:N(1*) |
Place input window at this column. |
ROW:N(1*) |
Place input window at this row. |
COLS:N(1*) |
Number of columns for the input window. |
ROWS:N(1*) |
Reserved for future use. |
LENGTH:N(1*) |
Maximum length of this input field. If LENGTH<0, use PRO/5 READ RECORD logic to get one character at a time. |
TYPE:N(1*) |
Reserved for future use. |
PROMPT:C(1*) |
Help prompt to display on the last line of the screen. |
HELPFILE:C(1*) |
Names the file that contains help information. (Refer to the discussion on HELP processing.) |
HELPITEM:C(1*) |
Names the help item within a searchable ASCII Help file to display if the user presses <HELP>. |
COLPOS:N(1*) |
Initial column position within the field. Either 0 or 1 will start at the first column. |
ROWPOS:N(1*) |
Reserved for future use. |
PAD:C(1*) |
Pad character. See the INPUTE Verb. |
DMASK:C(1*) |
Display mask. If specified, this is displayed in background mode as the user is typing. |
IMASK:C(1*) |
Input mask. |
OMASK:C(1*) |
Output mask. |
The following fields may be specified using any of the PRO/5 color and attribute mnemonics. Refer to Character Devices - Terminal Devices for additional information.
Field |
Description |
IATTR:C(1*) |
Input attributes (during data entry). |
OATTR:C(1*) |
Output attributes (during display). |
ICOLOR:C(1*) |
Input color (used to override IATTR$ color-RGB value). |
OCOLOR:C(1*) |
Output color (used to override OATTR$ color-RGB value). |
ARG:C(1*) |
Argument String used to modify program behavior. |
TIMEOUT:N(1*) |
Timeout in integer seconds, 1 to 255, or 0 for no timeout. |
SEARCH:N(1*) |
Reserved for future use. |
Input Sizing
The style of the input field is processed as either a fixed input or as a sliding window. The sliding window style allows lengthy fields within a limited area.
The style of the input area is determined by the relationship between INPUT.COLS and INPUT.LENGTH. A FIXED length input field will be used:
If INPUT.COLS=0 and INPUT.LENGTH+INPUT.COL fits in the current window,
A sliding input field will be used:
If INPUT.COLS>0 and INPUT.LENGTH>INPUT.COLS and INPUT.ROWS=0,
The sliding input field will be INPUT.COLS wide and input will slide through that length. The left and right arrow keys scroll through the off-screen field.