LINE INSERTION Example (:I)
LINE INSERTION Example (:I)
|
NAME |
DIM |
30 |
|
ADDRESS |
DIM |
30 |
|
CITY |
DIM |
17 |
|
STATE |
DIM |
2 |
|
ZIP |
DIM |
5 |
|
ROUTE |
DIM |
4 |
|
>CITYSTZ |
DIM |
30 |
|
. |
|
|
|
LOOP1 |
|
|
|
|
LOOP |
|
|
|
KEYIN |
*P01:04,"Full Name: ",*EDIT,NAME; |
|
|
CMATCH |
" ",NAME |
|
|
CONTINUE |
IF EOS |
|
|
CONTINUE |
IF EQUAL |
|
|
CMATCH |
"A",NAME |
|
|
CONTINUE |
IF LESS |
|
|
CMATCH |
"Z",NAME |
|
|
CONTINUE |
IF GREATER |
|
|
BREAK |
IF DOWN |
|
|
REPEAT |
WHILE FKEY |
|
LOOP2 |
|
|
:I
After command:
|
ADDRESS |
DIM |
30 |
|
CITY |
DIM |
17 |
|
STATE |
DIM |
2 |
|
ZIP |
DIM |
5 |
|
ROUTE |
DIM |
4 |
|
CITYSTZ |
DIM |
30 |
|
>COUNTRY |
DIM |
20 |
|
. |
|
|
|
LOOP1 |
|
|
|
|
LOOP |
|
|
|
KEYIN |
*P01:04,"Full Name: ",*EDIT,NAME; |
|
|
CMATCH |
" ",NAME |
|
|
CONTINUE |
IF EOS |
|
|
CONTINUE |
IF EQUAL |
|
|
CMATCH |
"A",NAME |
|
|
CONTINUE |
IF LESS |
|
|
CMATCH |
"Z",NAME |
|
|
CONTINUE |
IF GREATER |
|
|
BREAK |
IF DOWN |
|
|
REPEAT |
WHILE FKEY |
|
LOOP2 |
|
|
Note the following:
The new data line becomes the current pointed line. After the :I command was entered, the cursor was positioned at the beginning of line 5. The operator then entered the string 'NEW DATA LINE ENTERED HERE'. This was analyzed by edit and converted as displayed.
All lines below the pointed line are not moved or modified.
Only the top line is moved to the scratch area. A null entry would cause this line to be retrieved from the scratch area and redisplayed as the to data line. All lines above the pointed line are rolled up one line.
The :IC or :In command would have caused SUNEDIT to continue prompting for new lines until the count (n) reached zero or a null entry was made.
See Also: Insertion Commands, SUNEDIT Commands, Line Edit Mode, SUNEDIT
![]() |