Lasso Soft Inc. > Home

Array

An array is an object that can hold multiple values which are referenced by index. An array can be thought of as a series of numbered variables or as a list. Array elements are numbered starting at 1 and are always sequential.

Arrays can hold values of any other data type. Arrays can hold integers, decimals, strings, pairs, or even other arrays or maps. The size of an array is only limited by the amount of memory that is available.

A new, empty array can be created using the [Array] tag. For example, [Variable: 'myArray' = (Array)] places a new, empty array in the variable myArray.

An array can also be created with values by specifying parameters within the [Array] tag. Each parameter to the [Array] tag becomes one element of the array. For exmaple, [Variable: 'myArray' = (Array: 1, 2, 3)] creates a new array with three elements.

See the descriptions for each of the array members tags such as [Array->Size], [Array->Get], [Array->Insert], [Array->Remove], [Array->Sort], etc. for details about how to manipulate elements of the array.

Arrays are returned as the result from many LDML tags. For example, [String->Split] returns an array of elements from a string and [Action_Params] returns an array of pairs representing the parameters passed to the current Lasso action.

  • Syntax
  • Parameters
[Variable: 'myArray' = (Array)]

[Variable: 'myArray' = (Array: 'one', 'two', 'three')]

[Variable: 'myArray' = (String: '1 2 3')->(Split: ' ')]
Examples

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

Tag Link Array Category Data Type
Type Data Type Data Source Any
Support Preferred Version 5.0
Output Type Security
Implementation Internal Sets Lasso 6.0, Lasso 5.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