Page of SA21-9213-0
issued 15 September 1975
By TN L: SN21-0247
Storage Considerations
The following list shows how many bytes of storage are required for each data
type that can be in the active workspace:
Data Type Number of Bytes Required
Character constant or variable name 1 byte per character
Whole numbers that are equal to or
less than 231-1
4 bytes
Whole numbers that are greater than 8 bytes
Decimal numbers 8 bytes
Logical data 1/8 byte (1 byte can contain 8
ones or zeros)
Because the 5100 active workspace contains a fixed amount of storage, it is good
practice to conserve as much storage as possible. Following are some considera-
tions that can be used to conserve storage:
Make all objects (variables and user-defined functions) not required for use out-
side of a user-defined function local to the function.
0 Store data in data files on the tape, and use an APL shared variable (see
Chapter 8) to transfer the data into the active workspace when required.
Clear suspended functions (see Chapter 7) from the active workspace.
Group user-defined functions by related operations and store each group into
a workspace file on tape. Then when a certain group of related functions is
required to process data in the active workspace, the stored workspace contain-
ing these functions can be copied into the active workspace. When the pro-
cessing is done, the functions can be expunged (see Chapter 5) and another
group of functions (one workspace) can be copied into the active workspace.
0 If a value consists of all ones and zeros, store the value as logical data. For
example, you have the following vector:
v E: C r'C1 I4 f- 1. 0 I!> 2 ...' :I. >
v E: (:: 'r' I3 17
I. :I. I 3. :I. :I. 3. :I. 3.
The result is a vector of 10 ones, and each 1 requires four bytes of storage.
However, the vector can be changed to a logical vector as follows:
v E: c 'I' (:I 14 4- 1 A
v I:.:: C: *i' (:I r4
v E: I:: T (3 li
:I. 1. :I. 1. 1. I. I. :I. :I. :I.
The result looks just like the previous result; however, only 2 bytes of storage
was required.
Page of SA21-92134
Issued 15 September 1975
By TNL: SN21-0247
0 Names of 3 characters or less require 8 bytes of storage in the symbol table
(the symbol table is part of the active workspace where the names of all the
symbols, including variables, user-defined functions, and labels, are stored).
Names of 4 characters or more require an additional 8 bytes plus 1 byte for
each character in the name.
Note: Even if an object is erased from the active workspace, the storage used
for its name will not be available for use unless the contents of the active
workspace are written to tape with a )SAVE command and then loaded or
copied back into the active workspace.
0 Identical names that are local to more than one user-defined function do not
require additional symbol-table space for each function.
When the contents of the active workspace are written to tape using the
)CONTINUE command, then the stored workspace is loaded into a 5100
with a larger active workspace, the amount of available workspace (see OWA
system variable in Chapter 5) remains the same as it was when the contents of
the active workspace were originally written to tape. To take advantage of the
additional storage in the larger active workspace, write the contents of the active
workspace to tape using the )SAVE command, then load the stored workspace
back into the 5100.
0 Protect the tape data cartridge from dust and dirt. Cartridges that are not
needed for immediate use should be stored in their protective plastic envelopes.
0 Keep data cartridges away from magnetic fields and from ferromagnetic mater-
ials that might be magnetized. Information on any cartridge exposed to a
magnetic field could be
0 Do not expose data cartridges to excessive heat (more than 130' F) or sunlight.
0 Do not touch or clean the tape surface.
0 If a data cartridge has been exposed to a temperature drop exceeding 30' F since
the last usage, move the tape to its limits before using the tape. The procedure
for moving the tape to its limits is:
Use the )LIB command to move the tape to the last marked file.
Use the )MARK command to mark from the last marked file to the end of
the tape. For example:
)MARK 200 1 n
where n is the number of the last marked file, plus one.
When ERROR 012 (end of tape) is displayed, use the IREWIND command
to rewind the tape.
Previous Page Next Page