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 #145 background imageLoading...
Page #145 background image
DIM
arrays
DIMN
Defines
an
array
to
SuperBASIC.
String, integer and floating point arrays can
be
defined.
String
arrays
handle
fixed
length strings and the
final
index
is
taken
to
be
the
stnng
length.
Array Indices
run
from 0 up
to
the maximum index specified
in
the DIM statement; thus
DIM
will
generate
an
array
with
one more element
in
each dimension than
is
actually
specified.
When
an
array
is
specified
it
IS
initialised
to
zero
for
a numeric array and zero length
strings
for
a stnng
array.
syntax:
index:
~
numenc_expresslon
array:
~
indentifier(index *
[,
Indexl *)
DIM array *[. array] *
example:
I.
DIM
string
array$(10,10,50)
ii.
DIM
matrix(100,100)
18
arrays DIMN
IS
a function which
will
return the maximum
size
of
a specified dimension
of
a
specified
array.
If
a dimension
is
not specified then the
first
dimension
is
assumed.
If
the
speCified
dimension does
not
exist
or the identifier
is
not
an
array then
zero
is
returned.
syntax:
array: = identifier
index:
~
numeric_expression
[1
for dimension
1,
etc.]
DIMN(array
[,
dimension] )
example: consider the array defined
by:
DIM
a
(2
,3
,4)
i.
PRINT
DIMN(A,1)
[will print
2]
ii.
PRINT
DIMN(A,2)
[Will
print
3]
iii.
PRINT
DIMN(A,3)
[will print
4]
IV
PRINTDIMN(A)
[will print
2]
v.
PRINT
DIMN(A,4)
[will print
0]
12184

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