[Array->ForEach] invokes a tag, type, or compound expression on each element in the array. 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 array in turn (i.e. the tag is called with each element of the array 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 array by modifying the array element which is passed into it by reference.
[Var: 'array' = (Array: 1, 2, 3, 4)]
[Define_Tag: 'Ex_Square', -Required='value']
[#value *= #value]
[Return: True]
[/Define_Tag]
[$array->(ForEach: \Ex_Square)]
See the Lasso 8 Language Guide for examples of how to use this tag.
Tag Link | [Array->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 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft