Lasso Soft Inc. > Home

[List->ForEach]

[List->ForEach] invokes a tag, type, or compound expression on each element in the list. The tag requires a single parameter which is a tag reference, data type instance, or compound expression. The parameter is invoked on each element of the list in turn (i.e. the tag is called with each element of the list as a parameter in turn). The parameter must return True for the tag to continue. If the parameter returns False then the operation is halted.

The parameter can modify the list by modifying the list element which is passed into it by reference.

  • Syntax
  • Parameters
[Var: 'list' = (List: 1, 2, 3, 4)]
[Define_Tag: 'Ex_Square', -Required='value']
  [#value *= #value]
  [Return: True]
[/Define_Tag]
[$list->(ForEach: Ex_Square)]
Required Parameters
Tag A tag reference, data type, or compound data type. This parameter will be applied to each element of the list in turn
Examples

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

Tag Link [List->ForEach] Category Array
Type Member Data Source Any
Support Preferred Version 8.0
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.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