FPP 1L "17 May 2001" "" "Version 3.0.0" [section 6 of 17]

.-3[DESCRIPTION]         .-2[OPTIONS]         .-1[LANGUAGE OVERVIEW]
Top
.+1[CONDITIONAL STATEMENTS]     .+2[EXPRESSIONS]         .+3[MACRO EXPANSION]


DEFINITION STATEMENTS

Definitions of names for preprocessor conditionals may be set on the command line:

fpp   -D_OS_UNIX   -D_SUN386
fpp   -D_OS_UNIX=1   -D_SUN386=1
fpp   _OS_UNIX=1   _SUN386=1

or in the input file text itself:

C #define   _OS_UNIX   1
C #define   _SUN386   1

The cc(1)-like forms with define and undefine options are supported; these two invocations are equivalent:

fpp   -D_OS_UNIX   -DWORDSIZE=32
fpp   _OS_UNIX=1   WORDSIZE=32

These two are roughly equivalent:

fpp   -U_OS_VAXVMS
fpp   _OS_VAXVMS=0

They differ in that, although the symbol _OS_VAXVMS will evaluate to 0 in a numeric context, a test for definition with

C #if defined(_OS_VAXVMS)
or
C #ifdef _OS_VAXVMS
will select the else-branch in the first case, and the then-branch in the second case.

If the value is omitted, as in

fpp   _OS_UNIX=   _SUN386=

or

C #define   _OS_UNIX
C #define   _SUN386

a value of 1 is assumed.

Names can be undefined by

C #undef  name
C #undefine  name

If the name was not already defined, the request is silently ignored.


.-3[DESCRIPTION]         .-2[OPTIONS]         .-1[LANGUAGE OVERVIEW]
Top
.+1[CONDITIONAL STATEMENTS]     .+2[EXPRESSIONS]         .+3[MACRO EXPANSION]