## (Concatenation)

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)
 
 dseg segment
   b1 byte
   b2 byte 1
 dseg ends
 
 thread main
   ELEMENT_OUT(1)
   ELEMENT_OUT(2)
   wait SEC_2
 endt

This is the same as writing

 dseg segment
   b1 byte
   b2 byte 1
 dseg ends
 
 thread main
   NumOut(0, LCD_LINE1, b1)
   NumOut(0, LCD_LINE2, b2)
   wait SEC_2
 endt

Generated by  doxygen 1.6.2