EasyManuals Logo

Sinclair QL User Manual

Sinclair QL
422 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #37 background imageLoading...
Page #37 background image
and there are eight Internal pigeon holes Involved:
weekday$
EJ
length1
D
word$
~
length2
D
month$
IFEBRUARYI
length3
D
sum
G
average
D
Characters
and
Strings
If
you think that
IS
a
lot
of
fuss
for
a fairly simple problem you can certainly shorten
it.
The shortest
version
would be a single
line
but
It
would be
less
easy
to
read.
A reasonable
compromise uses the symbol
& which stands for the operation:
Join
two
strings
Now type:
NEW
10
LET
weekday$
;;;
"FIRST".II
20
LET
word$
;;;
"OF".IIL
30
LET
month$
=
"FEBRUARY"""
40
LET
phrase$
=
weekday$
&
word$
&
month$
..
"
50
LET
length
=
LEN(phrase$)."
60
PRINT
length/3."
RUN"II
The output
is
5
as
before but there are some different internal effects:
weekday$
FIRST
length
G
word$
OF
month
FEBRUARY
phrase$
FIRSmFFEBRUARY
There
is
one more reasonable simplification which
is
to
use READ and
DATA
Instead
of the first three LET statements.
Type:
NEW.II
10
READ
weekday$,
word$,
month$
..
"
20
LET
phrase$
=
weekday$
&
word$
&
month$."
30
LET
length
=
LEN(phrase$)."
40
PRINT
length/3."
50
DATA
"FIRST","OF","FEBRUARY""II
RUN"II
The internal effects of this version are exactly the same
as
those of the prevIous
one.
READ causes the setting up of internal pigeon holes wilh values
in
them
In
a similar
way
to
LET.
12/84
21

Other manuals for Sinclair QL

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sinclair QL and is the answer not in the manual?

Sinclair QL Specifications

General IconGeneral
ProcessorMotorola 68008
Clock Speed7.5 MHz
RAM128 KB (expandable to 640 KB)
ROM48 KB
Operating SystemSinclair QDOS
Release Year1984
StorageMicrodrive tape loop
Graphics256x256 pixels, 8 colors
PortsRS-232, ROM cartridge
SoundBeeper (internal speaker)

Related product manuals