Lasso Soft Inc. > Home

[ staticarray ]

Type

Lasso's [staticarray] object type is an efficient, non-resizable container for holding any object type. Staticarrays are created in the same way as any object, but Lasso supports a "shortcut" syntax to produce staticarrays. This expression begins with an open parenthesis immediately followed by a colon and then zero or more comma delimited expressions, ending with the closing parenthesis.

  • Syntax
  • Methods
  • Traits
staticarray( element_1, element_2, ..., element_n )

(: element_1, element_2, ..., element_n )
Has methods:
  • staticarray->get(p0::integer)
  • staticarray->get=(p0, p1::integer)
  • staticarray->size()
  • staticarray->join(p0::integer, p1)
  • staticarray->join(p0::staticarray)
  • staticarray->sub(p0::integer, p1::integer)
  • staticarray->sub(pos::integer)
  • staticarray->asString()
  • staticarray->asstaticarray()
  • staticarray->forEach()
  • staticarray->contains(crit)
  • staticarray->find(crit, offset::integer = ?)
  • staticarray->findposition(crit, offset::integer = ?)
  • staticarray->values()
  • staticarray->keys()
  • staticarray->+(rhs::staticarray)
  • staticarray->+(rhs::void)
Examples
  • Beginner

Create a variable of type staticarray

This example creates a staticarray using the explicit and shorcut methods.

Code

var ( myArray = staticarray(1, 2, 'hello') )

var ( myOtherArray = (: 1, 2, 'hello') )

$myArray+'\n'
$myOtherArray

Result

staticarray(1, 2, hello)
staticarray(1, 2, hello)

Recent Comments

No Comments found

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