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 #365 background imageLoading...
Page #365 background image
CHAPTER
12
QL
ARCHIVE
REFERENCE
VARIABLES
Variable names may be up
to
thirteen characters
In
length, and must not start with a
digit
(0
to
9).
They may contain any combination
of
upper or lower case alphabetic
characters, or digits. Other characters are not allowed, except for $
and.
which have
special
meanings.
If
a vanable name ends with a $
it
is
a string
van
able.
Strings may be up
to
255 characters
In
length.
If
the name does not end with a $ the variable
IS
numeric. A variable name
may reter
to
the contents of a record
In
a
file
and
is
then known as a field vanable. Field
variables are normally assumed
to
refer to the current
file
but may be made to refer
to another open
file
by Including a logical file name, separated by a . from the variable's
name. Such a field variable
IS
written
as:
logical_fi/e_name
. field_name
For example main.continent$.
If
a vanable name Includes a dot then
It
must refer to
a field
In
an open
file.
If
there
IS
no dot an attempt
IS
made to match the name to an
eXisting variable
in
the following sequence:
1 a field
of
the current file
2 a local variable
(a
parameter
in
the current procedure,
if
any)
3 a global variable
An error message
IS
given
if
no match
is
found.
SYNTAX
The termsynlax refers
to
the exact structure of a command
or
function. The syntax of
a command specifies the parameters that the command needs,
in
what order they must
appear and the symbols
(if
any) used to separate them.
This section describes the notation used to express the syntax of Archive's programming
language.
EXPRESSIONS
An expression
is
a combination of literal values, variables, functions and operators which
results
in
a single
value.
A numeric expression results
In
a numenc value and a string
expression
results
in
a text
value.
Examples are:
3 * y * sin (x) + len (a$) [numeric]
"abc"
+ a$ + rept
("
-
",
5) [string]
An expression
may,
as
in
the above examples, be composed of several sub-expressions.
In
such a case you may not mix sub-expressions of different types. They must
all
be
stnng expressions or
all
numenc.
Syntax
Conventions
The syntax definitions are similar
to
those used to define the syntax of SuperBASIC,
i.e.:
Symbol Meaning
italics denotes a syntactic entity
[ ] encloses an
optional item
** encloses Items that may be repeated
I or
[ ] comment
Syntactic
Entities
slit
literal string
s.exp string expression
n.8xp
numeric
expression
exp expression, either stnng or numeric
ptm print item
var
variable name, either stnng or numenc
Ifn
logical
file
name
fnm
physical file name (up to 8 characters)
pnm
procedure name
A literal stnng
IS
text enclosed
In
quotes, for example text:
or
'text':
A string expression
is
a literal string, or a combination of literal strings, string variables
and string functions that results
in
a text value for example:
"fred"
+a$+chr(72)
38
12/84

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