SYSTEM FUNCTIONS
System functions are used like the primitive (built-in) functions; they are monadic
(one argument) or dyadic (two arguments) and have explicit results.
Following is a list of the system functions and their meanings. A complete des-
cription of each follows the list:
System Function Meaning
OCR name Canonical representation
OFX name Fix
OEX name Expunge
ONL class Name list
character ONL class Name list beginning with the specified character
ONC name Name classification
The 0 CR Function: Canonical Representation
The UCR function formats a user-defined function into a character matrix. This
function is monadic (takes one argument); the argument for the OCR function
must be a scalar or vector of characters representing the name of an unlocked
user-defined function. For example, you have the following user-defined function:
The function INTG is used to create a vector whose length and contents are spe-
cified by the input argument:
128
To format the function INTG into a character matrix and assign the matrix to a
variable named VAR, the following instruction would be entered:
VAR is displayed as follows:
P
VAR
R+.IN'I'G A- First row is line 0 of the function.
R+ApO
I 4- 1.
!3 T A
R
'I'
: R
I:: :I: ::I 4.. A
:I: 6.. I 4.1.
-) I :il A
1 /$ T A
R T
6 I. 2
pVAR- Indicates VAR is a 6-row, 12-column matrix.
Notice that the line numbers are removed along with the opening and closing V.
Also, labels within the function are aligned at the left margin.
Now matrix VAR can be changed by simply indexing the elements:
To format a matrix created by the OCR function into a user-defined function, use
the OFX function. The OFX function is discussed next.
The OFX Function: Fix
The OFX function forms (fixes) a user-defined function from a character matrix
(that was most likely formed using the OCR function). This function is monadic
(takes one argument); the argument for the OFX function is the name of a matrix
to be formed into a user-defined function. If an error is encountered (invalid char-
acter, missing single quote, etc) as the matrix is being formed into a user-defined
function, the operation is interrupted, the number of the row in error minus one
is displayed, and no change takes place in the active workspace (the user-defined
function is not formed).
129
Previous Page Next Page