mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-08 07:42:33 +01:00
Author:halw
Date:2010-03-05T03:15:15.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@506 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -45,11 +45,11 @@ The effect of such a multi-branch instruction, if the value of <code>exp</code>
|
||||
|
||||
The loop construct provides a flexible framework for iterative computation. Its flexibility lies in how the complete form can be tailored and simplified for certain purposes by including or omitting optional parts.
|
||||
|
||||
You'll learn that the loop construct is always used in one of two forms: a '''base''' form which allows precise control over details of all loop aspects, and an '''iteration''' form which abstracts many of the details and provides a concise notation for traversing data structures and other objects which support iteration.
|
||||
You'll learn that the loop construct is always used in one of two forms: a '''base''' form which allows precise control over details of all loop aspects, and an '''iteration''' form which abstracts many of the details and provides a concise notation, ideal for traversing data structures and other objects which support iteration.
|
||||
|
||||
We will explore the entire mechanism, but let's approach things a little at a time.
|
||||
|
||||
====Two examples====
|
||||
====Two forms -- two examples====
|
||||
|
||||
First let's take a look at two examples. These examples accomplish the same goal: they both use a loop to visit and print the content of each node of a linked list of character strings. So, the list in question might be declared like this:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user