A numeric expression
is
either a number, or a combination of numbers, numeric variables
and operators
(+,
-,
*,
I,
etc)
that results
in
a numeric value for example:
(3+x)1sin(y)
A print
item
is
one of four possibilities:
at,
lab,
ink, paper. A
full
description of a print
item
in
our syntax notation
is:
prinLitem:~
I at n
exp,
n exp
I tab n exp
I ink n exp
I paper n exp
Logical
file
names and procedure names have the same restrictions as variable names.
PhYSical
file
names must also not exceed eight characters.
As
an example of a syntax definition, consider the syntax of the order command.
In
our notation
it
appears
as:
order
spec>
var;
a I d
order order spec *[ , order spec J*
Order therefore needs to be followed by
at
least one order specification which
Itself
consists of a variable separated by a colon from a letter which must be either a or d.
In
addition you can also include
up
to
three further order specifications provided each
pair
IS
separated by commas. Clearly
the
syntax notation provides a much more compact
description.
Note that the syntax notation does not
tell
you
the meaning or purpose of the symbols
so
you
will
have
to
read the
rest
of the description
for
each command. The syntax only
gives you a formal description of the number and kind of items that go
to
make
up
a valid command.
In
addition the syntax notation does not
tell
you the maximum number
of repetitions allowed
for
the repeated
items.
Order
will
accept up
to
four
pairs
of
a variable
and a letter
A
field
Is
the space reserved
to
hold either a string or a number.
In
Archive, each field
is
identified by a field variable name. Whether a particular field
can hold a string or a number
is
dependent
on
the name given
to
the field
at
the time
it
was created - string fields have a name ending with a
$.
An Archive string field may
hold up
to
255 characters. A numeric field has a name that does not end with a $ sign.
All
numbers are stored
in
the same amount of space, regardless of their
value.
The
possible range for a number
is
the same
as
the valid numeric range for the arithmetic
operators.
A
record
is
a collection of fields, whose contents are related
in
some
way.
The fields
of a record might.
for
example, be used
to
hold the
name,
the address and the telephone
number of a particular person.
In
Archive the records are of variable length
so
that each
record only takes
up
as much room
as
is
necessary
to
hold the information contained
In
ItS
fields. There may be up
to
255 fields
in
an Archive record.
A
data
file
IS
made up from a number of related records.
To
continue the above example,
a data
file
could consist of a collection of name, address and telephone number records
for many different people. The number of records
in
an Archive data
file
is limited to
roughly
15
000.
In
practice,
you
are limited
to
the capacity of one Microdrive cartridge,
which will hold about 1000 records of 100 characters. A
file
is
the basic unit that you
can save on, or load from, a Microdrive cartridge. Each
file
has a name
to
identify
it.
In
Archive you give a physical name
to
the
file
when
it
is
created, but you can change
the logical name
at
any
time.
When you want
to
read from or write
to
a data
file
you must first open
it.
Generally
speaking, opening a data
file
transfers a copy
of
the
file
from the Mlcrodrlve cartridge
into memory although,
in
the case of a long
file,
It
is
possible that only part
of
the
file
Will
be present
in
memory
at
anyone
time.
You
can open a data
file
in
read
only
mode with look which,
as
its
name suggests, means
that you can not change
Its
contents.
You
also have the option of opening a data
file
in
update mode with open
so
that
you
are
allowed both
to
read and
to
change
its
contents.
12/84
Reference
ARCHIVE
DATA
FILES
A Field
A Record
A File
Opening and
Closing Files
33