From e0073d0cd30748c408ef39c5c0607bbd3e070dd0 Mon Sep 17 00:00:00 2001 From: eiffel-org Date: Sat, 14 Oct 2017 13:51:09 +0000 Subject: [PATCH] Update wikipage ET: Agents. (Signed-off-by:bmeyer). git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@1923 abb3cda0-5349-4a8f-a601-0c33ac3a8c38 --- .../eiffel/Tutorials/eiffel-tutorial-et/et-agents.wiki | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/documentation/17.05/eiffel/Tutorials/eiffel-tutorial-et/et-agents.wiki b/documentation/17.05/eiffel/Tutorials/eiffel-tutorial-et/et-agents.wiki index 31ae2f59..03dc9616 100644 --- a/documentation/17.05/eiffel/Tutorials/eiffel-tutorial-et/et-agents.wiki +++ b/documentation/17.05/eiffel/Tutorials/eiffel-tutorial-et/et-agents.wiki @@ -51,7 +51,7 @@ Among the features of ROUTINE and its descendants the most importan As an example of using these mechanisms, here is how the function integral could look like in our INTEGRATOR example class. The details of the integration algorithm (straight forward, and making no claims to numerical sophistication) do not matter, but you see the place were we evaluate the mathematical function associated with f, by calling item on f: - integral (f: FUNCTION [ANY, TUPLE [REAL], REAL]; low, high: REAL): REAL + integral (f: FUNCTION [TUPLE [REAL], REAL]; low, high: REAL): REAL -- Integral of `f' over the interval [`low', `high'] require meaningful_interval: low <= high @@ -120,7 +120,7 @@ In the agent agent record_city (name, population, ?, ?), we say tha For type checking, agent record_city (name, population, ?, ?) and agent your_routine (?, ?) are acceptable in exactly the same situations, since both represent routines with two arguments. The type of both is - PROCEDURE [ANY, TUPLE [INTEGER, INTEGER]] + PROCEDURE [TUPLE [INTEGER, INTEGER]] where the tuple type specifies the open operands. @@ -241,6 +241,8 @@ Inline agents are interesting also as an implementation of the notion of [http:/ Agents provide a welcome complement to the other mechanisms of Eiffel. They do not conflict with them but, when appropriate -- as in the examples sketched in this section -- provide clear and expressive programming schemes, superior to the alternatives. +Compatibility note: earlier versions of the agent classes (ROUTINE, PROCEDURE, FUNCTION, PREDICATE) had an extra initial generic parameter, for which ANY was generally used. The compiler has been engineered to accept the old style in most cases. + {{SeeAlso|[[Event Programming with Agents]] }}