pTAL Reference Manual (G06.24+, H06.09+, J06.03+)
Recursion
Because each activation of a procedure or subprocedure has its own data area, a procedure or
subprocedure can call itself or can call another procedure that in turn calls the original procedure.
Parameters
A procedure or subprocedure can have optional or required parameters. The same procedure or
subprocedure can process different sets of variables sent by different calls to it.
Data Types
A pTAL program can declare and refer to the following types of data:
DescriptionData Type
8-bit integer byteSTRING
16-bit integer wordINT, INT(16)
32-bit integer doublewordINT(32)
64-bit integer quadruplewordFIXED, FIXED(0), INT(64)
Fixed-point quadruplewordFIXED(-19 to -1)
Fixed-point quadruplewordFIXED(1 to 19)
32-bit floating-point doublewordREAL, REAL(32)
64-bit floating-point quadruplewordREAL(64)
n-bit field, where 1 <= n <= 31UNSIGNED(n)
32-bit byte addressBADDR
32-bit 2-byte addressWADDR
32-bit byte code word addressCBADDR
32-bit 2-byte code word addressCWADDR
16-bit SG-relative byte addressSGBADDR
16-bit SG-relative 2-byte addressSGWADDR
32-bit SG-relative 2-byte addressSGXBADDR
32-bit SG-relative 2-byte addressSGXWADDR
32-bit byte addressEXTADDR
Explicitly named 32-bit byte addressEXT32ADDR
*
64-bit byte addressEXT64ADDR
*
32-bit code byte addressPROCADDR
Explicitly named 32-bit code byte addressPROC32ADDR
*
64-bit code byte addressPROC64ADDR
*
*
These data types are 64-bit addressing functionality added to the EpTAL compiler starting with SPR T0561H01^AAP.
For more information, see Appendix E, “64-bit Addressing Functionality” (page 531).
Data Grouping
A pTAL program can declare and use groups of related variables, such as arrays and structures
(records).
pTAL Features 33