Tag Link | -- Decrement | Category | Symbol |
---|---|---|---|
Type | Symbol | Source Available | No |
Support | Preferred | Version | 5.0 |
Change | Unchanged | Data Source | Any |
Output Type | Decimal or Integer | Security | None |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0 |
-- decrements the value of the right parameter by one and returns the result. If the right parameter is a variable then the result is stored in the variable.
The result will be either an integer or a decimal value depending on the type of the right parameter. This symbol cannot be used with string values.
[Output: -
<?LassoScript
Output: -
?>
[-
<?LassoScript
-
?>
Required Parameters | |
---|---|
Right_Parameter | The variable or value which should be decremented by one. |
To display the values from 10 down to 1:
Use the [Loop] ... [/Loop] tags and a decremented variable. The following code initializes a variable to 11, then decrements it once on each loop, displaying the results.
[Variable: 'Result'=11]
[Loop: 10]
[Output: --$Result]
[/Loop]
10 9 8 7 6 5 4 3 2 1