How to pass arguments to a function?

Hi guys,

trying to pass arguments to a function. But I already fail with the syntax check as $a and $1 is not defined…

Question is how to get the parameters in function.

Please advice.

Thanks!

Caller:

# TestFuncArgs

:global FuncArgs [:parse [/system script get FuncArgs source]];

$FuncArgs a="this is arga value"  "this is arg1 value";

Function:

#FuncArgs
:global FuncArgs do={

   :local str1 "arg a=$a";
   :local str2 "arg '1'=$1";
   [/log info ("in myFunc: str1 $str1")];
   [/log info ("in myFunc: str2 $str2")];
}