TAL Reference Manual

Compiler Directives
TAL Reference Manual526371-001
16-28
Usage Considerations
Usage Considerations
This directive can appear in the compilation command or anywhere in the source code.
DEFEXPAND turns the define-listing setting on for subsequent code. DEFEXPAND
has no effect if NOLIST or SUPPRESS is in effect.
NODEFEXPAND turns the define-listing setting off for subsequent code.
PUSHDEFEXPAND pushes the current define-listing setting onto the directive stack
without changing the current setting.
POPDEFEXPAND removes the top value from the directive stack and sets the current
define-listing setting to that value.
DEFEXPAND Listing
In the DEFEXPAND listing, the DEFINE body appears on lines following the DEFINE
identifier. In the listing:
Lowercase letters appear in uppercase.
No comments, line boundaries, or extra blanks appear.
The lexical level of the DEFINE appears in the left margin, starting at 1.
Parameters to the DEFINE appear as $n (C-series system) or #n (D-series
system), where
n is the sequence number of the parameter, starting at 1.
A single SQL statement might generate code that contains many TAL declarations or
statements. DEFEXPAND includes such code in the listing.
Example of DEFEXPAND Directive
This example requests that the compiler list the expanded DEFINE:
?DEFEXPAND !List expanded DEFINEs
DEFINE increment (x) = x := x + 1#; !Expanded DEFINE
DEFINE decrement (y) = y := y - 1#; !Expanded DEFINE
!Other global data declarations
VST1614.vsd
POPDEFEXPAND
PUSHDEFEXPAND
NODEFEXPAND
DEFEXPAND