IP
Prompts for and accepts input from the terminal.
Syntax
IP{char{bufferRef}}
Syntax Elements
char An optional prompt character. If included, it remains in effect until reset with an IBN, IBP, IN, IP or PROMPT command.
If char is not included, it defaults to the last prompt character used or to a colon (:) if no other character has been specified.
bufferRef A direct or indirect reference to a buffer or select register where the input data is to be placed.
Operation
IP{char} places data in the active input buffer, replacing the existing parameter pointed to by the buffer pointer.
IPchar bufferRef places input in the buffer or select register specified by bufferRef. The prompt character is required in this case.
Leading and trailing blanks are removed and embedded blanks are replaced with a single attribute mark, thereby replacing the current parameter in the input buffer with multiple parameters. If the input is to a file buffer attribute (as specified by bufferRef) and contains embedded blanks, the embedded blanks are replaced with a single attribute mark as above. The attributes then replace consecutive attributes in the item. For example:
If you enter "ABC DEF GHI" when the command,
IP?&3.2
is executed, the values "ABC", "DEF", and "GHI" would replace attributes
two, three, and four, respectively, in file buffer 3.
If you want to retain blanks input at the terminal and treat the input text as a single attribute, use the IBP command.
Pressing RETURN only in response to an input prompt nulls the current parameter as pointed to by the buffer pointer.
The input buffer pointer does not change position after an IP command.
Note
The IP command does not read stacked input the way an INPUT statement in DataBasic does. All input commands in Proc ignore stacked data.
Example 1
Command Input |
PIB Before |
PIB After |
---|---|---|
|
|
|
Example 2
Command Input |
PIB Before |
PIB After |
---|---|---|
|
|
|
Example 3
Command Input |
PIB Before |
PIB After |
---|---|---|
|
|
|
Example 4
Command Input |
File Buffer 1 Before |
File Buffer 1 After |
---|---|---|
|
|
|
Example 5
Command Input | File Buffer 4 Before | File Buffer 4 After |
---|---|---|
IP?&4.1
|
000 2831
|
000 2831
|