Lasso Soft Inc. > Home

[Reference]

The [Reference] tag allows a reference to data to be stored in a variable rather than a copy of the referenced data. The @ symbol is a synonym for reference.

Every variable in Lasso is a named reference to an object. The referenced object could be a string, integer, array, map, or any other data type. Usually, each object is only referenced by one variable.

It is sometimes desirable to point to the same object using two variables. The same object could be referenced by both a local and page variable. Or, an object could be stored in an array and simultaneously referenced by a page variable.

This is accomplished by storing a reference in a variable. [Variable: 'VariableOne' = (Reference: $VariableTwo)] stores a reference to VariableTwo in VariableOne. Now, both variables refer to the same object and changes made to one are reflected in the other.

  • Syntax
  • Parameters
[Variable: 'VariableReference' = (Reference: $VariableName)]

[Variable: 'MapReference' = (Reference: $MapName->(Find: 'Element Name'))]

[Variable: 'ArrayReference' = (Reference: $ArrayName->(Get: Array Index))]

[Local: 'LocalReference' = (Reference: $PageVariable)]

[Local: 'ParamReference' = (Reference: Params->(Get: Array Index))]
Examples

See the Lasso 8 Language Guide for examples of how to use this tag. This tag is documented on page 82.

Tag Link [Reference] Category Technical
Type Substitution Data Source Any
Support Preferred Version 6.0
Output Type Reference Security None
Implementation Internal Sets Lasso 6.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft