PRECODE(3)

Table of Contents

Name

precode C code executed before a product is generated

Synopsis

%precode
C-code segment

Description

The precode section of a product description file contains C code that is executed by an SDTool after a product output file has been opened, but before product generation begins. The C code is inserted at the beginning of the GEN_x procedure in file GEN_x.c, where x is the option character that selects the product. If preprocessing or traversal of the parse tree is necessary before the product is generated, then this is the place to put the code.

The C code in this section is executed only if the product is generated. The C code in the startcode and middlecode sections of the source description file will be executed before the code in any precode section. Preprocessing that must occur before the generation of all products should be placed in the middlecode section. Any preprocessing specific to a product should be done in a precode section.

Example

%precode
reportinfo("Begin Generation of Product X.\n");

See Also

FINALCODE(2)
HEADER(2)
MIDDLECODE(2)
STARTCODE(2)
DECLARE(3)
POSTCODE(3)
GEN_x(5)


© 1990 Lucent Technologies, Inc
© 1998 Harmony Software, Inc