Functions in 3.x scripts (:parse usage)

Hi,

Does anybody know how to use the :parse command? I have some 1+ year old mail response from Mikrotik support but the suggested usage doesn’t work (on ROS 3.11).
I have problems in using function ‘local’ variables and passing values for them when executing the function.

If I use:
:global func [:parse (“:put "test $arg"”)];

then :env print shows:
“func”={:error “expected end of command”}

If I add the $arg definition it works better

:global func [:parse (“:local arg "test" ; :put "test $arg"”)];$func;
test test

: env print
“func”={(eval [/local{“name”=$“arg”; “value”=“test”}])(eval); (eval [/put{“message”=( . "test " $“arg”)}])(eval)}


but in the old message there is mentioned that I can invoke the function using this form:
$func args=“aaaaa”

but it doesn’t override the value of the $arg I defined and if I ommit the variable declaration the :parse command will not ‘compile’ the function..


Regards
Dalibor Toman