Previous: The Bound Subsequent For, Up: The For Statement [Index]
An early exit clause may follow the expression introducing the traversed collection, with a semicolon separating the two. The clause is (like the ‘while’ loop clause) a continuation condition (and not a stop one), with the traversal loop breaking when the test fails.
for (, text a in list("a", "b", "c", "d"); a < "d") { o_(a, "\n"); }
outputs:
a b c