| Syntax |
$decVariable{variable_name} |
| Documentation | Substracts the specified decimal value and the value of the named variable:
decimal_value, an optional parameter that defaults to 1 and represents the decrementation amount of the variables value.
an java.lang.NumberFormatException if 'decimal_value' or the variable's value is non numeric decimal. |
| Examples | |
The following expression decrements the variable named 'value'
$decVariable{value} } $if{$existsVariable{value}}
$setVariable{value}{$add{$getVariable{value}}{-1}} } $if{$existsVariable{value}}
$setVariable{value}{$dec{$getVariable{value}}} }
$decVariable{value}{7} } $if{$existsVariable{value}}
$setVariable{value}{$add{$getVariable{value}}{-7}} } $if{$existsVariable{value}}
$for{$set{counter}{0}}{$less{counter}{7}}{$incLocal{counter}}
$setVariable{value}{$dec{$getVariable{value}}} } |
|
| Group | Math |
| Minimum required transaction-mode: | UPDATE=TREE |
| Required scripting permission of the developer | PERMISSION_FL_BASIC |
| Minimum parameters | 1 |
| Maximum parameters | 2 |