The FUNCDEF (dene function) command consolidates a series of OSA commands into one operation and gives it a name. Executing the function name is the same as executing the series of commands contained in the function.
Reserved Words
Do not use the reserved words (as listed in Chapter 8 of this manual) as DLP names. Using reserved words interrupts the dening process and executes the invoked function. For example, if a DLP is named \ALL," the reserved word would disrupt the operation of any function modied by ALL, such as
DISPOSE ALL.
Any names created by the VARDEF, ACTDEF, TRDEF, or FUNCDEF commands become reserved words until they are erased from internal memory.
A function must be stored in internal memory before it can be executed. In the example below, the FUNCDEF command stores a DLP named HIGH PEAK in internal memory. Notice the matching delimiter characters (@) mark the beginning and end of a command series assigned to HIGH PEAK.
10 CLEAR 723
20 OUTPUT 723;"IP;";
30 OUTPUT 723;"FUNCDEF HIGH_PEAK,@";
40OUTPUT 723;"STARTWL 700NM;STOPWL 1200NM;";
50OUTPUT 723;"TS;MKPK HI;";
60OUTPUT 723;"@;"
The simplest way to store new functions in internal memory is with a computer program. However, if you have the auxiliary
The following gure illustrates a program structure that simplies the process. The model simplies debugging and documentation, and conserves memory.