W
W0lfw00ds
Guest
I'm trying to add a simple
message.i:
test.p:
In this version, the
I want to use
How I can fix the code to make it work?
Continue reading...
IF
statement to my include .i
-file to handle optional unnamed parameters
:message.i:
Code:
/*
- {1}: Message.
- {2}: OPTIONAL Sender name
*/
&IF DEFINED({2}) <> 0 &THEN
{2} = "Unknown sender".
&ENDIF.
MESSAGE "{2}" + ": " + "{1}" VIEW-AS ALERT-BOX.
test.p:
Code:
{message.i "hello world" }
// Should output "Unknown sender: hello world".
// Does not compile.
{message.i "hello world" "Michael" }
// Should output "Michael: hello world".
In this version, the
message.i
will throw error if the second parameter is missing.I want to use
unnamed parameters
and avoid the parameter naming.How I can fix the code to make it work?
Continue reading...