pTAL Reference Manual (H06.08+)

Compiler Directives
HP pTAL Reference Manual523746-006
17-27
DEFINETOG
The lexical level of the DEFINE appears in the left margin, starting at 1.
Parameters to the DEFINE appear as #n, where n is the sequence number of the
parameter, starting at 1.
DEFINETOG
DEFINETOG specifies toggles for use in conditional compilation, without changing
their settings. If DEFINETOG is specifying a toggle for the first time, its setting is off.
toggle-name
is an identifier.
The EpTAL compiler allows toggle-name to be RISC1, _TNS_E_TARGET, or
TARGETSPECIFIED, as long as toggle-name does not change the value of
target in the IF, IFNOT, or ENDIF statement (see IF and IFNOT on page 17-39
and ENDIF on page 17-29).
toggle-number
is an unsigned decimal constant in the range 1 through 15. Leading zeros are
ignored.
Example 17-16. DEFEXPAND Directive
?DEFEXPAND ! List expanded DEFINEs
DEFINE increment (x) = x := x + 1#; ! Expanded DEFINE
DEFINE decrement (y) = y := y - 1#; ! Expanded DEFINE
! Other global data declarations
toggle-number
,
toggle-name
toggle-number
( )
,
toggle-name
VST212.vsd
DEFINETOG