Maintain a set variables indexed by a level. More...
Go to the source code of this file.
Macros | |
#define | __BLOCKSTATE_CLR(NAME, ...) |
Set the brace-level-specific variable with name NAME to zero. | |
#define | __BLOCKSTATE_DEC(NAME, ...) |
Decrement brace-level-specific variable with name NAME . | |
#define | __BLOCKSTATE_INC(NAME, ...) |
Increment brace-level-specific variable with name NAME . | |
#define | __BLOCKSTATE_SET0(NAME, ...) |
Set the brace-level-specific variable with name NAME to 0 . | |
#define | __BLOCKSTATE_SET1(NAME, ...) |
Set the brace-level-specific variable with name NAME to 1 . | |
#define | __BLOCKSTATE_SET2(NAME, ...) |
Set the brace-level-specific variable with name NAME to 2 . | |
#define | __BLOCKSTATE_SET3(NAME, ...) |
Set the brace-level-specific variable with name NAME to 3 . | |
#define | __BLOCKSTATE_TST(NAME, ...) |
Test the brace-level-specific variable with name NAME . | |
Maintain a set variables indexed by a level.
Using the macros with only one argument results in creating a block-local variable with the name that is passed as argument. For example
has three variables in the MINE
series, one that is active outside the braces and another at each brace level. So the expansion of the above would be
With a second argument, that argument is expected to represent another concept of "level" than nestedness of braces. In the example above if we'd use ()
parenthesis instead of {}
braces by adding __PARENTHESIS_DEPTH__ as second argument to the macros, the result would be similar.
#define __BLOCKSTATE_CLR | ( | NAME, | |
... | |||
) |
Set the brace-level-specific variable with name NAME
to zero.
If the variable is not yet defined, define it first.
#define __BLOCKSTATE_DEC | ( | NAME, | |
... | |||
) |
Decrement brace-level-specific variable with name NAME
.
If the variable is not yet defined, sets its value to -1
.
#define __BLOCKSTATE_INC | ( | NAME, | |
... | |||
) |
Increment brace-level-specific variable with name NAME
.
If the variable is not yet defined, sets its value to 1
.
#define __BLOCKSTATE_SET0 | ( | NAME, | |
... | |||
) |
Set the brace-level-specific variable with name NAME
to 0
.
If the variable is not yet defined, define it first.
#define __BLOCKSTATE_SET1 | ( | NAME, | |
... | |||
) |
Set the brace-level-specific variable with name NAME
to 1
.
#define __BLOCKSTATE_SET2 | ( | NAME, | |
... | |||
) |
Set the brace-level-specific variable with name NAME
to 2
.
#define __BLOCKSTATE_SET3 | ( | NAME, | |
... | |||
) |
Set the brace-level-specific variable with name NAME
to 3
.
#define __BLOCKSTATE_TST | ( | NAME, | |
... | |||
) |
Test the brace-level-specific variable with name NAME
.
If the variable is not yet defined, define it first and set it to zero.