Lasso Soft Inc. > Home

[Map->Size]

[Map->Size] returns the number of elements (keys) in the map.

  • Syntax
  • Parameters
[Map->(Size)]
Required Parameters
Map The map whose size should be returned.
Examples

To return the size of a map:

Use the [Map->Size] tag. The following example returns the number of items in a map of primary color names to HTML color codes.

<?LassoScript
  Variable: 'Colors'=(Map: 'red'='#ff0000', 
    'green'='#00ff00', 
    'blue'='#0000ff');
  Output: $Colors->Size;
?>
Result:
3
Tag Link [Map->Size] Category Array
Type Member Data Source Any
Support Preferred Version 5.0
Output Type Integer Security None
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