![]() |
|
|
|
|
|
|
8
11th November 07:10
External User
Posts: 1
|
In ISE Eiffel:
================================ users: ARRAY[USER] my_feature (s: STRING) is do users.linear_representation.do_if (agent action (?), agent name_matches(?, s)) end action (user: USER) is do io.put_string("Name = " + user.name.out + " Value = " + user.value.out + "%N") end name_matches(user: USER; s: STRING): BOOLEAN is do Result := user.name.is_equal (s) end =============================== It would be nice to write do_if (agent instruction, agent conditional expression) -- Peter Horan School of Information Technology peter@deakin.edu.au Deakin University +61-3-5227 1234 (Voice) Geelong, Victoria 3217, AUSTRALIA +61-3-5227 2028 (FAX) http://www.cm.deakin.edu.au/~peter -- The Eiffel guarantee: From specification to implementation -- (http://www.cetus-links.org/oo_eiffel.html) |
|