Reference
Every time
you
open a data
file,
Archive reserves space for the field variables needed
by a record within
the
file.
The
field vanables
always
contain
the
values
of
the
current
record.
When
you
close a data
file
with
close or qUit any changes that
you
have made are
copied
into
the
file
stored
on
the Microdrive cartridge. The copy held
in
memory
is
discarded. Closing a
file
is
the only
way
of
ensuring that the copy
on
the
Microdrive
cartridge contains your
latest
version.
Since
an
open
file
uses
part
of
the computer's
memory,
you
should not
leave
files
open
if
you
are
not
using them.
When
you
leave Archive
with
the
quit command,
all
open
files
are
closed automatically.
Do not turn off the computer, or remove a cartridge from a Microdrive, while the
cartridge contains open files.
Logical
File Names
Each
open data
file
has
an
associated
logical
file
name,
given
to
it
when
the
file
is
opened.
If
you
do
not
specify a logical
file
name when
you
open
the
file,
it
is
automatically given
the logical
file
name
"main':
The logical file name
is
used
to
identify a particular
file
when
you
are
using
several
files
at
once.
PROCEDURES
A procedure
is
a named section
of
program, starting
with
a procedure declaration
of
the
form:
ptlC
pnm[;
var
*
[,
var]
*]
and ending
with:
endproc
It
may be referred
to
by
name from any other program or procedure, including
itself.
It
acts
as
though
its
code had been inserted
at
the
pOint
from which
it
IS
called.
In
Archive the proc and endproc commands cannot
be
entered directly
at
the
keyboard,
but
are
added automatically when
you
use
the
program editor
to
create a procedure.
40
THE
PROGRAM
EDITOR
The program editor
is
entered using the edit command.
If
there
are
no
procedures present
in
memory,
you
will
be
immediately offered the option
of creating a new procedure. Otherwise
you
are
given a
list
of
all
the procedures
In
memory on the
left
hand side
of
the display
area.
The
first
procedure
is
highlighted and
is
listed
in
full
on
the right hand side
of
the display.
The
first
line
of
the procedure
is
highlighted
to
mark
the
current procedure and
the
current
line.
Once
in
edit
you
have
five
options:
Select a procedure
Press
TABULATE
to
move down the
list
of
procedures, press SHIFT and TABULATE
to
move up the
list.
The
listing
on
the screen always
shows
the current procedure.
Select a line
Use
the
up and down cursor
keys
to
select a line within the current procedure. The
current line
is
highlighted.
Press
F3
for the menu of editing commands.
There
are
four commands, which are selected
by
pressing the
key
corresponding
to
the
first
letter
Delete
Press
ENTER
to
delete the procedure highlighted on the
left
of
the
display.
Press
any other
key
to
leave the command without deleting the procedure.
New
Type
in
the
name
of
the
new procedure and press ENTER.
If
a procedure
of
that name already
exists
you
will
be offered the opportunity
to
edit
it.
Cut Removes
text
from the current procedure and transfers
it
to
the paste buffer
Before calling this command
use
the up or down cursor
keys
to
make the first
(or
last)
line
of
the region
to
be removed
the
current
line.
Then use the up and
down cursor
keys
to
mark the region
of
text
to
be removed.
Press
ENTER to
remove
the
text
into
the
paste buffer
Paste Copy the contents
of
the
paste buffer into
the
current procedure below the
current
line.
Paste
will
clear the paste buffer
12/84