Hello PlantUML team,
Like:
:%eval("1 + 2");
[See on PlantUML...]
Regards,Th.
Researching a workaround, to eval the string "1+2", I discover this solution:
@startuml !procedure proc($arg) $arg :$r; !end procedure proc("!$r=1+2") @enduml
Nevertheless, it is not direct: it needs that the preproc runs more one or more time...
Therefore with:
java -jar plantuml.jar -preproc test_eval.pu
We obtains, test_eval.preproc:
@startuml !$r=1+2 :$r; @enduml
Then, we observe the expected result :
@PlantUML:
Thanks for your works,Regards,Th.
FYI, wanted feature open here:
(--------)
Hello,
Goods
Is it possible to eval also Builtin functions, as:
@startuml :3; :%eval("1+2"); :%version(); :%eval("%version()"); @enduml
Hello PlantUML,
Here is another test:
@startuml !$a=1 + abc :1 + abc = $a; :1 + abc = %eval("1 + abc"); !$b="1 + abc" :$b = %eval($b); @enduml
Could you have a look?