Rounding Variable Values
This page uses Hashtag Round commands to alter Variable values.
Different Variable types and Hashtag Markup styles are demonstrated below.
Processing this Hashtag Markup:
<#
set cache.value to 99.988888;
round cache.value to 2 decimals;
#>
<# set my_var to 99.988888; round my_var to 2 decimals; #>
<# set myBucket.myVar to 99.988888; #>
<# round myBucket.myVar to 2 decimals; #>
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.
<#[cache.value]#> ⇒ | 99.99 |
<#[my_var]#> ⇒ | 99.99 |
<#[myBucket.myVar]#> ⇒ | 99.99 |