foreach
Synopsis:
(foreach identifier in list
statement)
Description:
For each value within the list list
list execute the statement
statement .
Example:
To update the property stones of each hole in the list to 0 :
(foreach hole in (list "hole01" "hole02" "hole03")
(update property "stones" of hole to 0))
To update the property state to default:
(foreach hole in (list "hole01" "hole02" "hole03") (do
(update property "state" of hole to "default")
end))
Contact:
Fulvio Frapolli (
fulvio . frapolli //at// unifr . ch),
Amos Brocco (
amos . brocco //at// unifr . ch)
* Remove spaces and replace //at// with @