G - Goto

Positions the line pointer at a specified line and then lists that line. Gn is identical to n.

Syntax

G{n}

Syntax Elements

n is the line to be pointed at and listed. If 'n' is omitted, zero is assumed, and the line pointer returns to the top of the item.

Messages

The message Top is displayed if the line pointer is set to zero, and the message EOI n (where n is the last line number of the item) is displayed if the pointer is set to the EOI.

See Also

B (Bottom), T (Top), n command.

Example 1

:EDIT FILE1 ITEM1
Top
.L99
001 AAAAA
002 BBBBB
003 CCCCC
004 DDDDD
EOI 004
.G3
003 CCCCC
.



List command. List the first 99 lines in the item.
Item has only 4 lines, so entire item is listed.




Goto command. Lists line 3. Line pointer points to the end of line 3.

Example 2

:EDIT FILE1 ITEM1
Top
.L99
001 AAAAA
002 BBBBB
003 CCCCC
004 DDDDD
EOI 004
.G
Top
.



List command. List the first 99 lines in the item.
Item has only 4 lines, so entire item is listed.




Go to command without line number. Line pointer points to the top of the item.