LassoScript Utility
Basics Browse Detail

:= Assignment and Value

Tag Link := Assignment and Value Category Symbol
Type Symbol Source Available No
Support Preferred Version 7.0
Change Unchanged Data Source Any
Output Type Any Security None
Implementation Internal Sets Lasso 8.5, Lasso 8.0, Lasso 7.0

Description

:= sets the variable named by the left parameter to the value of the right parameter and returns the value that was set. 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 and returned.

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)).

Syntax

[(Variable: 'Left_Parameter') := Right Parameter]

<?LassoScript
(Variable: 'Left_Parameter') := Right_Parameter;
?>

<?LassoScript
$Left_Parameter := Right_Parameter;
?>

Parameters

Required Parameters
Left_Parameter The variable which is to be assigned.
Right_Parameter The value to assign to the variable and return.

Change Notes

Documentation of this tag was added in 7.0.2

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.