Monarch 9460 Printer User Manual


 
5-34 Command Reference
Example 1
This example defines the temporary buffer field CURR_QTY as a numeric field with
a length of 4 bytes.
DEFINE TEMPORARY,CURR_QTY,4,N
Example 2
This example shows the use of local variables. The function ADDNUM has two
local variables defined that receive the parameters passed from the call. The fist
parameter (#5) is placed in the TfirstNum field and the second parameter (#6) is
placed in the TsecondNum field. The Tsum variable is defined as a global
Temporary variable and is accessible from any functions in the script.
DEFINE TEMPORARY, Tsum, 10, N
FUNCTION START
BEGIN
.
.
.
CALL ADDNUM (#5, #6)
.
.
.
END
FUNCTION ADDNUM
BEGIN
DEFINE LOCAL, TfirstNum, 10, N
DEFINE LOCAL, TsecondNum, 10, N
ADD TfirstNum, TsecoundNum
MOVE TsecondNum, Tsum
END