Tag Link | = Assignment | Category | Symbol |
---|---|---|---|
Type | Symbol | Source Available | No |
Support | Preferred | Version | 5.0 |
Change | Unchanged | Data Source | Any |
Output Type | None | Security | None |
Implementation | LCAPI | Sets | Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0 |
= sets the variable named by the left parameter to the value of the right parameter. The variable named by the left parameter must already have been created with the [Variable] or [Local] tag.
The right parameter can be of any type. The value of the right parameter will always be copied into the variable.
This symbol can also be used to set the value of an element from an array by using an [Array->Get] tag as the left parameter.
Note: If the parameter on the right hand side of the symbol is a negative literal it should be surrounded by parentheses. For example, ($var = (-1)).
[(Variable: 'Left_Parameter') = Right Parameter]
<?LassoScript
(Variable: 'Left_Parameter') = Right_Parameter;
?>
<?LassoScript
$Left_Parameter = Right_Parameter;
?>
Required Parameters | |
---|---|
Left_Parameter | The variable in which the value should be stored. |
Right_Parameter | The value to be stored. |
To assign a value to a variable:
Use the assignment symbol =. The following example assigns a value 10 to a variable Result. The value of the variable is then output.
<?LassoScript
Variable: 'Result'=0;
$Result = 10;
Output: $Result;
?>
10