Copy Cursor Editing - AMSTRAD CPC464 User Manual

Cpc464 colour personal computer 64k
Hide thumbs Also See for CPC464:
Table of Contents

Advertisement

1.2.9 Copy Cursor Editing

First list the program using LIST. (We' ll continue to assume that you' re working on the short trial
program that fits onto a single screen)
5 CLS
10 FOR N = 3 2 T O 2 5 5
2 0 P R I N T C H R $ ( N ) ;
3 0 NEXT N
The error is in line 20 - there' s an S instead of a string signifier $ (S tells the computer to consider
the characters immediately following to be text, and not numeric data). You can either retype 20
from the beginning, and then re-enter, or you can use the screen editor as follows:
Hold down [SHIFT] (either the one on the left or right of the keyboard will do) and then press the up
cursor key [ ].
You can either tap it a line at a time, or you can hold it down and wait for the auto repeat to move it
for you. The instant you take your finger off the key, the cursor stops, and a little practise will soon
familiarise you with the effects. If you overshoot the line, then return with the ' down' key [ J ] again
whilst holding down [SHln].
This process causes the ' COPY CURSOR' to separate from the main cursor (they both look the same),
and the copy cursor is taken to the line you wish to modify.
Start with the copy cursor placed over the first character in the line.
5 C LS
1 0 F O R N = 3 2 T O 2 5 5
2 0 P R I N T C H R $ ( N ) ;
30 NEXT N
Ready?
If you were to take the main cursor to the line to modify using the cursor keys without the [SHIFT]
held down, the computer would not recognise this as a valid action since only the characters entered
directly after the main cursor will be recognised as valid instructions.
If you do try and overwrite the line in this way, you can easily get out of the tangle by pressing the
[ESC] key BEFORE you hit any [ENTER] key or function key that contains a chr$(13), If you
accidentally type (and [ENTER]) the command word N E W - then your entire program will have
been lost forever - so be careful.
Once you have started typing on a line, if you try and move out of it without pressing [ENTER], the
computer will bleep if you hit an illegal boundary. once you escape from the problem by hitting
[ENTER] nothing will be lost in the program -unless you have entered a valid line number as the
first typed characters, in which case the line whose number has been written will be ' overwritten'
and will need to be retyped.
With the COPY cursor correctly in place, keep tapping the [COPY] key until the COPY cursor
reaches the item on the line that you need to change. (When you get used to the speed at which the
COPY cursor moves, you will be able to hold down the the [COPY] key, and move the cursor more
rapidly).

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents