mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 23:02:28 +01:00
At "Two forms -- two examples" corrected as per my comment suggestions.
Updated wikipage ET: Instructions. (Signed-off-by:RTH10260). git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2172 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
[[Property:modification_date|Tue, 10 Sep 2019 21:54:55 GMT]]
|
||||||
|
[[Property:publication_date|Tue, 10 Sep 2019 21:54:55 GMT]]
|
||||||
[[Property:title|ET: Instructions]]
|
[[Property:title|ET: Instructions]]
|
||||||
[[Property:weight|-6]]
|
[[Property:weight|-6]]
|
||||||
[[Property:uuid|628bf3db-728f-0b3c-bdbb-fe52deaae5b7]]
|
[[Property:uuid|628bf3db-728f-0b3c-bdbb-fe52deaae5b7]]
|
||||||
@@ -104,11 +106,7 @@ Here's one example:
|
|||||||
and the other:
|
and the other:
|
||||||
|
|
||||||
<code>
|
<code>
|
||||||
across
|
across my_list as ic loop print (ic.item) end
|
||||||
my_list as ic
|
|
||||||
loop
|
|
||||||
print (ic.item)
|
|
||||||
end
|
|
||||||
</code>
|
</code>
|
||||||
''Loop example 2.''
|
''Loop example 2.''
|
||||||
|
|
||||||
@@ -117,14 +115,8 @@ At first observation, it may not appear that both of these examples are using th
|
|||||||
|
|
||||||
Incidentally, there is no requirement that ''Loop example 1'' occupy multiple lines, and ''Loop example 2'' occupy only one line. ''Loop example 1'' could have been written like this:
|
Incidentally, there is no requirement that ''Loop example 1'' occupy multiple lines, and ''Loop example 2'' occupy only one line. ''Loop example 1'' could have been written like this:
|
||||||
<code>
|
<code>
|
||||||
from
|
from my_list.start until my_list.off
|
||||||
my_list.start
|
loop print (my_list.item) my_list.forth end
|
||||||
until
|
|
||||||
my_list.off
|
|
||||||
loop
|
|
||||||
print (my_list.item)
|
|
||||||
my_list.forth
|
|
||||||
end
|
|
||||||
</code>
|
</code>
|
||||||
just as ''Loop example 2'' could have been written to take multiple lines. It comes down to a matter of balance among traditional style, conciseness, and readability.
|
just as ''Loop example 2'' could have been written to take multiple lines. It comes down to a matter of balance among traditional style, conciseness, and readability.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user