pTAL Guidelines for TAL Programmers
pTAL Guidelines for TAL Programmers—527256-002
2-1
2 Coding Guidelines
This section presents guidelines you can use to write TAL code that will be easier to
convert to pTAL than if you used all of the features of TAL.
Topics:
•
Guidelines Summary on page 2-1
•
Compilers on page 2-5
•
Variables on page 2-6
•
Arithmetic Operations on page 2-9
•
Pointers and Addresses on page 2-10
•
Procedures, Subprocedures, and Labels on page 2-24
•
Parameters on page 2-35
•
Hardware Indicators on page 2-40
•
Registers on page 2-51
•
STACK, STORE, and CODE Statements on page 2-55
•
Signed (Arithmetic) Left Shifts on page 2-56
Guidelines Summary
The following is an alphabetical list and summary of the guidelines described in this
section.
Topic Guideline (page 1 of 5)
$OPTIONAL Routine
on page 2-30 Use the $OPTIONAL built-in routine to
control whether parameters are passed to
variable and extensible procedures.
32-Bit Addresses
on page 2-14 Create 32-bit addresses only to reference
data in extended data segments.
@ Operator Applied to Variables
on
page 2-13
The data type of the value returned when
you apply the @ operator to a simple
variable is the address type you get when
you apply the @ operator to a pointer of the
same object type.
@ Operator With Labels and Subprocedure
Names on page 2-25
Do not apply an @ operator to the name of a
label or a subprocedure.
@ Operator With PROC, PROCPTR, and
PROCADDR Formal Parameters on
page 2-39
Apply the @ operator to a procedure name
that you pass as an actual parameter only if
the formal parameter is type PROCADDR.
Do not apply the @ operator to a formal
parameter of type PROC or PROCPTR.