Unable to append macro arguments using ##

0 votes
asked Apr 17 in Bug by rd27 (670 points)

It seems I am unable to append macro arguments using ##. For example, the following shows a rectangle with the text "ThisIs1Y" when I would expect "ThisIs1ThisIs2".

Thanks!

dave

!define EXAMPLE_APPEND_MACRO(X,Y) rectangle "X##Y"
EXAMPLE_APPEND_MACRO(ThisIs1,ThisIsY)

1 Answer

0 votes
answered May 18 by ichiro

Hi,

If you want to add it immediately after macro expansion, write 4 "#".

!define EXAMPLE_APPEND_MACRO(X,Y) rectangle "X####Y"
EXAMPLE_APPEND_MACRO(ThisIs1,ThisIsY)

 

...