TinTin++ Mud Client Manual

Command: #foreach {list} {variable} {commands}

         For each item in the provided list the foreach statement will update
         the given variable and execute the command part of the statement. List
         elements must be separated by braces or semicolons.

Example: #foreach {bob;tim;kim} {name} {tell $name Hello}
Example: #foreach {{bob}{tim}{kim}} {name} {tell $name Hello}

Related: break, continue, list, loop, parse, repeat, return and while.