This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
eiffel:faq:loops_across_iteration [2018/05/17 18:07] jonathan |
eiffel:faq:loops_across_iteration [2018/05/17 18:08] (current) jonathan |
||
---|---|---|---|
Line 22: | Line 22: | ||
===== Iteration with across ===== | ===== Iteration with across ===== | ||
+ | <code eiffel> | ||
+ | across list_of_customers as customer loop | ||
+ | Io.put_string (customer.item.name) | ||
+ | Io.new_line | ||
+ | end | ||
+ | |||
+ | |||
+ | across 1 |..| 5 as it loop | ||
+ | Io.put_integer (it.item) | ||
+ | Io.new_line | ||
+ | end | ||
+ | </code> |