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.
Содержание CPC464
Страница 1: ......
Страница 32: ...or you can type 3e1 1e1 ENTER 300 2 3000x1000 Type 3e3 1e3 ENTER 3000000 3 3000x0 001 Type 3e3 1e 3 ENTER 3 ...
Страница 102: ...PRINT 10 AND 12 Results in 8 PRINT 10 AND 1000 Results in 8 again ...
Страница 118: ...TO DO DRAW THIS PAGE ...
Страница 219: ...actual value may be made to vary during the execution of a program ...
Страница 240: ...Text and WINDOW planner Mode 2 80 Columns ...
Страница 241: ......
Страница 245: ...Sound envelope Music planner sheet ...