You copied the Doc URL to your clipboard.


The #assert preprocessing extensions of System V release 4 are permitted. These enable definition and testing of predicate names.

Such names are in a namespace distinct from all other names, including macro names.


#assert name
#assert name[(token-sequence)]



is a predicate name


is an optional sequence of tokens.

If the token sequence is omitted, name is not given a value.

If the token sequence is included, name is given the value token-sequence.


A predicate name defined using #assert can be tested in a #if expression, for example:

#if #name(token-sequence)

This has the value 1 if a #assert of the name name with the token-sequence token-sequence has appeared, and 0 otherwise. A given predicate can be given more than one value at a given time.

See also

Was this page helpful? Yes No