#assert

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.

Show/hideSyntax

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

Where:

name

is a predicate name

token-sequence

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.

Show/hideExample

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.

Show/hideSee also

Copyright © 2010-2012 ARM. All rights reserved.ARM DUI 0491H
Non-ConfidentialID070912