listwalk/2—runs instructions against each element in a list
The listwalk/2
operation runs instructions against each element in a list. The syntax for this function is as follows:
listwalk($LIST,$ELEM)
$ELEM=listwalk($LIST)
listwalk/2 arguments
Argument | Mode | Type | Description |
---|---|---|---|
| Input | LIST_OF ANY | Specifies the list for which each element is to be executed against |
| Output | ANY | Elements from the list against which instructions are to be executed |
Use the listwalk/2
operation to go through each element in list $LIST
, returning each element in $ELEM
. All instructions following the call of listwalk/2
are executed for each element.
listwalk/2 example
$E.msg = 'Bad slot names:';
listwalk($E.mc_bad_slot_names,$SLTNM);
concat([$E.msg,' ',$SLTNM],$E.msg);
The msg
slot is filled with the sequence of bad slot names.
Was this page helpful? Yes No
Submitting...
Thank you
Comments
Log in or register to comment.