Variable computation example.
Outputs: 3
Create a node and paste this following code into it’s landing page editor. Goto the node’s address and test with browser.
[[INITIALIZE:var1|1+2]] [[PRINT:var1]]
Note: To bring variables within the calculations, add a dollar sign before each. You may also use parenthesis for algebraic expression grouping.
[[INITIALIZE:var1|2]] [[INITIALIZE:var2|4]] [[INITIALIZE:var3|$var1+$var2]] [[INITIALIZE:var4|$var3/2]] The sum of [[PRINT:var1]] and [[PRINT:var2]] is: [[PRINT:var3]].[[cr]] The average of [[PRINT:var1]] and [[PRINT:var2]] is [[PRINT:var4]].