Parenthesis in macro arguments

0 votes
asked Feb 7 in Bug by Andreas Kågedal

The three signals below should look the same, but they don't. The first version, where there are no citations around the third argument, the 'data(addr-inf)' is not rendered correctly.

!definelong CALL(from,to,message)
from -> to : message

CALL(SysService, SMW, mysignal(data(addr-inf), a))
CALL(SysService, SMW, "mysignal(data(addr-inf), a)")
SysService -> SMW : mysignal(data(addr-inf), a)
commented Feb 14 by Andreas Kågedal
Is this a bug?
the arguments

  data(addr-inf), a

are renderd as

  data(addr-inf, a)

I realize you have lots of things to do, and maybe this is not at the top of your list. But just having a ack that you agree that this needs to be fixed at some point would be great.

1 Answer

0 votes
answered Feb 18 by Anthony-Gaudino (7,540 points)
The first looks wrong, it's like you're trying to pass 4 arguments to a macro that only accepts 3.

Also if you use parenthesis on macros they must be quoted.

This example works:
commented Feb 27 by andreas.kagedal (130 points)
OK, I understand. The macro-mechanism does note handle parenthesis in arugments in any "intelligent" way. They are just another character.