LassoScript Utility
Basics Browse Detail

++ Increment

Tag Link ++ Increment 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

Description

++ increments 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.

Syntax

[Output: ++Right_Parameter]

<?LassoScript
Output: ++Right_Parameter;
?>

[++Right_Parameter]

<?LassoScript
++Right_Parameter;
?>

Parameters

Required Parameters
Right_Parameter The variable or value which should be incremented by one.

Examples

To display the values 1 up to 10:

Use the [Loop] ... [/Loop] tags and a incremented variable. The following code initializes a variable to 0, then increments it once on each loop, displaying the results.

[Variable: 'Result'=0]
[Loop: 10]
  [Output: ++$Result]
[/Loop]

1 2 3 4 5 6 7 8 9 10