Hi,
When I try to make a macro to simplify the creation of messages and BES-boxes (to hide and unify the usage of web links and context specific coloring) I stumble on two problems.
Macro arguments cant contain embedded parantesises or comma characters - even if inside paranthesises. Also, if attempting to hide them by submitting a string (using " delimiters) the delimters show up in the expanded result.
Definition:
!define DOCUMENTATION_SERVER //my.server.com/path/
!define DOC_EXTENSION pdf
!definelong SEND(from,to,protocol,message)
from -\ to : [[ http:DOCUMENTATION_SERVER/public_protocols/protocol.DOC_EXTENSION ]] protocol<b>:</b>message
!enddefinelong
When I now write the following all works as expected...
SEND(Alice,Bob,LDAP,lookup)
...I do get the expected message on the form LDAP:lookup.
However, when I add parameters to the message (separating them using ; not to conflict with the , used by the macro) the macro expansion fails to include the right hand parnthesis;
SEND(Alice,Bob,LDAP,lookup(a;b))
...results in a message with the text LDAP:lookup(a;b without the trailing ).
2) Newline in macro argument handled differently in different cases?
If we have a long list of argument to a message we can (using the macro definition above) it is possible to style the arguments using html and even insert a newline:
END(Alice,Bob,LDAP,lookup(<b>aaaaaa</b>=3567;\n bbbbb=42))
...works as expected, even with the newline in the middle.
But if I do the same using an rnote instead as follows:
!definelong RAISE_ALARM(part,alarmname,message)
rnote over part DIFF_COLOR
<b>ALARM:</b> <&flag> alarmname
MSG = message
end note
!enddefinelong
RAISE_ALARM(Bob,ShoudNotHappenError,What is <b>this</b>?\nNewlines are treated differently!)
...then the html styling still works but the escaped newline does not work. Is this macro related or related to notes?
Br, Peter ...and thanks for all good work!