Evaluating Math Expressions
This page demonstrates setting and injecting Hashtag Variables using various techniques.
Variables can be set either as "strings" or math expressions.
Optional Contexts can be applied to alter the value before it is stored.
Processing this Hashtag Markup:
<# set val1 to "2"; #>
<# set val2 to 3; #>
<# set val3 to 4; #>
<# set result to (<#[val1]#> + <#[val2]#>) * <#[val3]#> as dollars; #>
Note: Hashtag Markup is shown below <# in bold #>.
The value generated by processing the Hashtag Markup, and applying any Variable Contexts, is injected into this HTML page after the ⇒ symbol.
<#[result]#> ⇒ $ 20.00