mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2025-12-06 23:02:28 +01:00
Merge changes from trunk into 20.05
git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@2254 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
[[Property:modification_date|Wed, 01 Jul 2020 08:52:09 GMT]]
|
||||
[[Property:publication_date|Wed, 01 Jul 2020 08:52:09 GMT]]
|
||||
[[Property:title|ET: Agents]]
|
||||
[[Property:weight|-3]]
|
||||
[[Property:uuid|ba49a80d-5ddf-8b30-4943-528974fd0ddd]]
|
||||
@@ -131,7 +133,7 @@ The freedom to start from a routine with an arbitrary number of arguments, and c
|
||||
|
||||
As another example of the mechanism's versatility, we saw above an integral function that could integrate a function of one variable over an interval, as in
|
||||
<code>
|
||||
your_integrator.integral (agent your_function (0, 1))
|
||||
your_integrator.integral (agent your_function, 0, 1)
|
||||
</code>
|
||||
|
||||
Now assume that <code>function3</code> takes three arguments. To integrate <code>function3</code> with two arguments fixed, you don't need a new <code>integral</code> function; just use the same <code>integral</code> as before, judiciously selecting what to close and what to leave open:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
[[Property:modification_date|Tue, 10 Sep 2019 21:54:55 GMT]]
|
||||
[[Property:modification_date|Wed, 01 Jul 2020 08:48:12 GMT]]
|
||||
[[Property:publication_date|Tue, 10 Sep 2019 21:54:55 GMT]]
|
||||
[[Property:title|ET: Instructions]]
|
||||
[[Property:weight|-6]]
|
||||
@@ -392,7 +392,7 @@ There is, however, one form of <code>check</code> that continues to be monitored
|
||||
</code>
|
||||
Here <code>Assertion</code> is a list of assertions as above, and <code>Compound</code> is a list of zero or more executable instructions.
|
||||
|
||||
This variant is used often when ensuring [[Void-safe programming in Eiffel|void-safety]]. It is used make certain that certain detachable entities are actually attached to objects when expected, and to create a new void-safe scope for accessing the objects. For example:
|
||||
This variant is used often when ensuring [[Void-safe programming in Eiffel|void-safety]]. It is used to make certain that certain detachable entities are actually attached to objects when expected, and to create a new void-safe scope for accessing the objects. For example:
|
||||
<code>
|
||||
check attached my_detachable as l_temp then
|
||||
l_temp.do_something
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
[[Property:modification_date|Wed, 01 Jul 2020 08:44:12 GMT]]
|
||||
[[Property:publication_date|Wed, 01 Jul 2020 08:44:12 GMT]]
|
||||
[[Property:title|ET: Lexical Conventions and Style Rules]]
|
||||
[[Property:weight|-2]]
|
||||
[[Property:uuid|60fdf029-8626-166d-cc4f-9069aacdda7f]]
|
||||
@@ -40,9 +42,9 @@ Successive declarations or instructions may be separated by semicolons. Eiffel's
|
||||
| <code>frozen</code>
|
||||
| <code>if</code>
|
||||
| <code>implies</code>
|
||||
| <code>indexing</code>
|
||||
| <del><code>indexing</code></del>
|
||||
|-
|
||||
| <code>infix</code>
|
||||
| <del><code>infix</code></del>
|
||||
| <code>inherit</code>
|
||||
| <code>inspect</code>
|
||||
| <code>invariant</code>
|
||||
@@ -56,7 +58,7 @@ Successive declarations or instructions may be separated by semicolons. Eiffel's
|
||||
| <code>old</code>
|
||||
| <code>once</code>
|
||||
| <code>or</code>
|
||||
| <code>prefix</code>
|
||||
| <del><code>prefix</code></del>
|
||||
|-
|
||||
| <code>Precursor</code>
|
||||
| <code>pure</code>
|
||||
@@ -75,6 +77,7 @@ Successive declarations or instructions may be separated by semicolons. Eiffel's
|
||||
| <code>undefine</code>
|
||||
|}
|
||||
|
||||
note: `infix`, `prefix` are not anymore reserved since version 19.12 , and `indexing` as well even before.
|
||||
|
||||
Since this tutorial has covered all the essential mechanisms, you may ignore the keywords not encountered; they are reserved for future use.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user