EXPRESSION(4)

Table of Contents

Name

expression evaluates a C expression and outputs it to the product

Synopsis

%[char]( C-expression )

Description

The C expression template construct causes the value of the expression to be computed during product generation and then output to the product. The optional char is a printf-style conversion character (see PRINTF(3) in the UNIX System Reference Manual). If there is no conversion character present the expression is assumed to have a STRING (pointer to char) value. For example:
%("Message")
has the same effect as the verbatim text: Message
The most useful conversion characters are d (for integer expressions) and c (for character expressions). For example, if x were an integer variable, then the construct: %d(45+x)
would compute the value of 45+x, convert it to string form, and output it to the product.

Any function or variable in the ivy*meta SDTB run-time library, or any function or variable declared in the header section of the source description file or declare section of the product description file, may be used in the expression.

See Also

HEADER(2)
DECLARE(3)
STATEMENT(4)

Bug

The floating point format may not work on all machines. For example:
%f(45.56)
may not always generate:
45.56


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