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)
$ELEM=listwalk($LIST)
listwalk/2 arguments
Argument | Mode | Type | Description |
---|---|---|---|
$LIST | Input | LIST_OF ANY | Specifies the list for which each element is to be executed against |
$ELEM | 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);
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.
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*