Unable to append macro arguments using ##

0 votes
asked Apr 17, 2019 in Bug by rd27 (460 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, 2019 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)

 

...