Physical LINE RETRIEVAL Example (:G)
Physical LINE RETRIEVAL Example (:G)
|
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 |
|
|
:G
After command:
|
|
LOOP |
|
|
|
KEYIN |
*P01:05,"Address 1: ",*EDIT,ADDRESS; |
|
> |
STOP |
IF ESCAPE |
|
|
GOTO |
LOOP1 IF UP |
|
|
CMATCH |
" ",ADDRESS |
|
|
CONTINUE |
IF EOS |
|
|
BREAK |
IF DOWN |
|
|
REPEAT |
WHILE FKEY |
|
LOOP3 |
|
|
|
|
LOOP |
|
|
|
KEYIN |
*P01:06,"Address 2: ,*EDIT,ADDRESS1; |
|
|
STOP |
IF ESCAPE |
|
|
GOTO |
LOOP2 IF UP |
|
|
CMATCH |
" ",ADDRESS1 |
|
|
CONTINUE |
IF EOS |
|
|
BREAK |
IF DOWN |
|
|
REPEAT |
WHILE |
|
LOOP4 |
|
|
|
|
LOOP |
|
|
|
KEYIN |
*P01:06,"City:. ",*EDIT,CITY; |
|
|
STOP |
IF ESCAPE |
|
|
GOTO |
LOOP3 IF UP |
|
|
CMATCH |
" ",CITY |
Note the following:
The new data lines displayed were the 23 lines in the file after the bottom line of the original screen.
If there were not 23 lines in the file beyond the lines already on the screen, the last 23 lines of the input file would be displayed on the screen.
The pointed line remains the same physical line number on the screen.
Physical LINE RETRIEVAL Example (:G-)
|
|
LOOP |
|
|
|
KEYIN |
*P01:05,"Address 1: ",*EDIT,ADDRESS; |
|
> |
STOP |
IF ESCAPE |
|
|
GOTO |
LOOP1 IF UP |
|
|
CMATCH |
" ",ADDRESS |
|
|
CONTINUE |
IF EOS |
|
|
BREAK |
IF DOWN |
|
|
REPEAT |
WHILE FKEY |
|
LOOP3 |
|
|
|
|
LOOP |
|
|
|
KEYIN |
*P01:06,"Address 2: ,*EDIT,ADDRESS1; |
|
|
STOP |
IF ESCAPE |
|
|
GOTO |
LOOP2 IF UP |
|
|
CMATCH |
" ",ADDRESS1 |
|
|
CONTINUE |
IF EOS |
|
|
BREAK |
IF DOWN |
|
|
REPEAT |
WHILE |
|
LOOP4 |
|
|
|
|
LOOP |
|
|
|
KEYIN |
*P01:06,"City:. ",*EDIT,CITY; |
|
|
STOP |
IF ESCAPE |
|
|
GOTO |
LOOP3 IF UP |
|
|
CMATCH |
" ",CITY |
:G-
After command:
|
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 |
|
|
Note the following:
The new data lines displayed were the 23 lines in the file before the top line of the original screen.
If the data file was at the beginning or there were not 23 data lines in the memory buffer, all available lines in memory and any additional lines already present on the screen would be displayed to fill it out.
The pointed line remains the same physical line number on the screen.
Physical LINE RETRIEVAL Example (:G3)
|
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 |
|
|
:G3
After command:
|
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 |
|
|
|
|
LOOP |
|
|
|
KEYIN |
*P01:05,"Address 1: ",*EDIT,ADDRESS; |
|
|
STOP |
IF ESCAPE |
Note the following:
The new data lines displayed were the bottom 20 lines of the original screen and the 3 lines in the input file after the bottom line of the original screen.
If there were not 3 lines in the file beyond the lines already on the screen, the last 23 lines of the input file would be displayed on the screen.
The pointed line remains the same physical line number on the screen.
The :G-n command would work exactly the opposite as the :Gn command. The new lines would be the 3 lines before the top line and the top 20 lines of the original screen.
See Also: Line Retrieval Commands, SUNEDIT Commands, Line Edit Mode, SUNEDIT
![]() |