IBM 5110 User Manual page 56

Apl
Table of Contents

Advertisement

Following are some considerations that can be used to conserve
storage:
• Make all objects (variables and user-defined functions) not required
for use outside of a user-defined function local to the function.
• Store data in data files on tape or diskette and use an APL shared
variable (see Input/Output Contro/) to transfer the data into the
active workspace when required.
• Clear suspended functions from the active workspace.
• Collect user-defined functions by related operations and store each
set into a workspace file on the media. Then when a certain set of
related functions is required to process data in the active
workspace, the stored workspace containing these functions can be
copied into the active workspace. When the processing is done, the
functions can be expunged (OEX) and another set of functions can
be copied into the active workspace.
• If a value consists of all l' sand 0' s, store the value as logical data.
For example, you have the following vector:
VECTO
R~··
: 1 . ()
(.> (
2 .. ··:1. )
VECTOI~
111 1 1 1 1 1 1 1
The result is a vector of ten 1 's, and each 1 requires 4 bytes of
storage. However, the vector can be changed to a logical vector as
follows:
VECTO
1~~··1
/">.
VECTO
I~
VECTOR
11111 1 1 111
Active Workspace Control
51

Advertisement

Table of Contents
loading

Table of Contents