Program Structure 4-1
PROGRAM STRUCTURE
This chapter discusses program flow control, buffer definitions, and other useful information for
writing your script.
Below is a sample of what a script may look like.
DEFINE TEMPORARY, RegPrice, 6, A
DEFINE TEMPORARY, NewPrice, 6, A
DEFINE PRINTER, PrtRegPrice, 7, A
DEFINE PRINTER, PrtNewPrice, 7, A
FUNCTION Start
BEGIN
CALL InitApp
CALL GetRegPrice
CALL GetNewPrice
CALL PrintTags
END
FUNCTION InitApp
BEGIN
CLEAR Printer
CLEAR RegPrice
.
.
.
END
.
.
.
Functions
A function is an independent group of statements usually performing a specific task. You execute a
function with the CALL command. See Appendix A, "Sample Script," for a sample script.
Rule: Each function must have a BEGIN and an END.
FUNCTION function-name
BEGIN
.
function-body
.
END
4