Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: Physicus on January 31, 2006, 01:04:35 am
-
Is it possible to perform (simple) math calculations with the variables of the code generation templates, like addition or subtraction f.i. ?
e.g. I have two variables:
$var1 = "5"
$var2 = "3"
and I want to fill the (mathematical) difference in a third variable:
$var3 = $var1 - $var2
Now var3 contains "5 - 3", but I want that it contains "2".
Of course it's due to the fact, that these variables are strings - but is there any possibility to perform the desired calculations?
Thanks in advance!
-
No. There isn't any way to do any sort of arithmetic in the code templates.
Well, that's not quite true. You can be calling an addin. (Search for EXEC_ADD_IN)
-
@simonm:
Thank you very much. After a longer try I found out how it works.
Best Regards.