17.01.2013 Views

AmstradCPC6128-hypertext-en-Sinewalker

AmstradCPC6128-hypertext-en-Sinewalker

AmstradCPC6128-hypertext-en-Sinewalker

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Notice how the word PR I N T is now in capitals. This means that the computer has<br />

accepted PR I N T as a known BASIC keyword.<br />

Type in: c L s [RETURN] to clear the scre<strong>en</strong>. Note that although the scre<strong>en</strong> is cleared<br />

wh<strong>en</strong> you type in: cL s [RETURN], your program is not erased from the computer's<br />

memory.<br />

GOTO<br />

The GOT 0 keyword tells the computer to go from one line to another in order to either<br />

miss out a number oflines or to form a loop. Type in:<br />

Now type:<br />

HI p r i n t "h eLL 0" [RETURN]<br />

20 goto 10 [RETURN]<br />

run [RETURN]<br />

.... and you will see he L L 0 printed continuously on the scre<strong>en</strong>, one under another on<br />

the left side. The reason for this, is that line 20 ofthe program is telling the computer.<br />

to go to line 1 0 and carry on processing the program from there.<br />

To pause the running of this program, press [ESC] once. To start it again, press any<br />

other key. To stop it running so that other instructions can be typed in, press [ESC]<br />

twice.<br />

Now type in:<br />

-c-L-s- [RETURN]- - -<br />

.... to clear the scre<strong>en</strong>.<br />

To see the word h eLL 0 printed continuously on each line, one next to another filling<br />

the whole of the scre<strong>en</strong>, type in the previous program but with a semi-colon; after<br />

the quotation marks"<br />

Type in:<br />

1 0 pr i n t "h eLL 0 "; [RETURN]<br />

20 go t 0 10 [RETURN]<br />

run [RETURN]<br />

Note that the semicolon; tells the computer to print the next group of characters<br />

immediately following the previous one, (unless the next group of characters is too<br />

large to fit on the same line).<br />

Chapter 1 Page 24 Foundation Course

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!