NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
## (Concatenation)

The ## directive works similar to the C preprocessor.

It is replaced by nothing, which causes tokens on either side to be concatenated together. Because it acts as a separator initially, it can be used within macro functions to produce identifiers via combination with parameter values.

#define ELEMENT_OUT(n) \
NumOut(0, LCD_LINE##n, b##n)
bool b1 = false;
bool b2 = true;
task main()
{
ELEMENT_OUT(1);
ELEMENT_OUT(2);
}

This is the same as writing

bool b1 = false;
bool b2 = true;
task main()
{
NumOut(0, LCD_LINE1, b1);
NumOut(0, LCD_LINE2, b2);
}