Line editing commands – Remote Processing CAMBASIC User Manual

Page 21

Advertising
background image

Program Editing - 2

Executing the EDIT statement will cause the target line to be displayed. Below this line the line number will be displayed
again and the cursor will be positioned at the start of the line. In the following text, the no tation < ENT ER> means pr ess
the key enclosed by the < > . The under line shows the cursor position.

CURSOR MOVEMENT

The display will appear as above. Pr ess < SPC> twice. You w ill notice that the first two characters appear as the cursor
moves to th e right. Now p ress < 4> and then < SPC > . T he curso r now moves 4 sp aces to the r ight.

Press < SPC> twice. The characters seem to be erased but are not. You can confirm this by pressing < SPC> twice
again.

You can not move the curso r with the < SPC > beyond the e nd of the line or with the < SPC > to the left of the text.
Editing the line number is not allowed.

Now press < ENTE R> . The line is reprinted and then saved. In this case no editing took place. This line will be used
throughout this section.

Now type a period “ . ” .

You will notice that line 10 once again appears for editing. This is the quick form of editing. The “ .” command causes
the “curr ent” line to be edited.

LINE EDITING COMMANDS

A

Abort All Changes And Reenter The Edit Mode
If you change your mind in the middle of an edit, you can use the “A ” com mand to cancel all the
editing work done on the line so far and redisplay the command for further editing.

If you are in the Insert Mode when the decision to abandon the edit occurs, you must exit the Insert
Mode. To get out of the Insert Mode, press the < ESC> key then press < A> .

D

Delete
To delete a character move the cur sor to the character to be deleted. Note that the character is not
printed at the cursor. N ow press the < D> on a terminal (do not press < ENTE R> yet). If several
characters are to be deleted, press the number first and then the < D> key.

The cursor will move leaving blanks where the deleted characters are. Now press < ENTER> .
The line is reprinted with the blanks indicating the edit. The blanks are not stored in the text. You
can confirm this by executing:

>LIST [line]

CAM BASIC will not let you delete more characters than exist on a line. There is no way to undo a
delete except by performing an Abort < A> . To view the changes to the line, type < L> . The
entire line will be displayed.

ESC

Escape From Insert And Replace Modes
This command turns off the Insert Mode. If you wish to use other editing commands while in Insert
M o d e, y o u m u s t p r e ss < E S C > .

Advertising