mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 23:02:28 +01:00
Update wikipage Iterating on a LIST. (Signed-off-by:tioui).
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2013 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -15,9 +15,9 @@ The first it the <code>across</code> loop. The <code>across</code> can be used o
|
|||||||
end
|
end
|
||||||
</code>
|
</code>
|
||||||
|
|
||||||
Note that the temporary variable (<code>la_list</code> in the example) represent an iterator of the <code>ITERABLE</code> object, and not directly an element like in many other language (like the <code>for</code> structure in Python for example).
|
Note that the temporary variable (<code>la_list</code> in the example) represent an iterator of the <code>ITERABLE</code> object, and not directly an element like in many other languages (like the <code>for</code> structure in Python for example).
|
||||||
|
|
||||||
The other mecanism use the <code>from until</code> loop syntax. This syntax offer more possibilities that the <code>across</code> loop, but is more risky.
|
The other mechanism uses the <code>from until</code> loop syntax. This syntax offer more possibilities than the <code>across</code> loop, but is riskier.
|
||||||
|
|
||||||
<code>
|
<code>
|
||||||
print_elements(a_list:LIST[INTEGER])
|
print_elements(a_list:LIST[INTEGER])
|
||||||
|
|||||||
Reference in New Issue
Block a user