AMSTRAD CPC464 User Manual page 82

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

Advertisement

The computer responds:
HELLO
Note that the quotations marks " I' have been omitted from the ' output stream' . Double quote marks
are used by BASIC strictly to delimit (ie. mark the beginning and end of) constant strings.
Now type:
PRINT#O,"HELLO"
.and the result is the same.
. . . .
But type:
PRINT#4,"HELLO"
. . ..and the computer has put the result at the top left of the screen because this is the first entry on
screen stream number 4 - which defaults to cover the entire text area unless previously defined by
the WINDOW command. The starting position for all text on a screen stream is the top left - and
stream 4 is as yet unused. The sign-o message used stream 0 (the default), so the text was sent to the
stream that appeared after the characters already displayed there.
This feature of AMSTRAD BASIC is particularly powerful, since it allows complex screen displays to
be built using simple commands and definitions, that contribute towards ease of producing a tidily
formatted screen display.
BASIC will print anything you put inside the double quotes without ' taking any notice' of it.
Reserved words may be used in the (print list):
PRINT "4*4"
and the computer responds with:
4*4
In order to instruct BASIC to operate on the multiplication, 4 multiplied by 4, the numbers and the
operator (the multiplication symbol *) must be left accessible to BASIC, and directed to a print
stream:
PRINT4*4
. . ..and BASIC returns the answer
16
Notice that the number is offset one column in from the left margin, since BASIC reserves this space
for the minus symbol (-1 that identifies a negative result.
The PRINT command has many other forms, using the full formatting facility of a thorough
implementation of the standard series of templates.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents