AMSTRAD CPC464 User Manual page 61

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

Advertisement

1.2.3
Look and see what has happened on the screen:
The computer has been told to display its full character set using the brief program you have just
written. If it hasn' t, then you' ve made an error in typing in the program that you haven' t noticed -
skip to 1.2.7 and see how to resolve the problem.
Assuming that all is well, and you have the required result, we' ll examine what lies behind the
displayed characters - it will help you understand exactly how your CPC464 communicates through
its range of characters.
The first point is to notice that the computer is not instructed to PRINT " abcdefghijklmn...... etc" ,it is
asked to:
PRINT CHR$(N)
N just happens to be a convenient shorthand note for a variable, the choice of the letter is arbitrary,
it just happens to be the mathematicians' favourite in such applications, a variable is an item of
computer information that ' varies' according to the instructions given in the program.
A number like 5 is fixed, it occurs between the numbers 4 and 6 - thus it is not a variable, a
character N is also fixed - it' s a letter from the alphabet.
So how did the computer know the difference ? If the letter N had been declared to be the
alphabetical character, we would have typed N in quotation marks:
" N "
and the computer would have responded with the message Syntax Error because it does not
-
understand the command sequence FOR " N" .

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents