diff --git a/documentation/current/method/eiffel-tutorial-et/et-dynamic-structure-execution-model.wiki b/documentation/current/method/eiffel-tutorial-et/et-dynamic-structure-execution-model.wiki index 714d4ca9..00475ff6 100644 --- a/documentation/current/method/eiffel-tutorial-et/et-dynamic-structure-execution-model.wiki +++ b/documentation/current/method/eiffel-tutorial-et/et-dynamic-structure-execution-model.wiki @@ -404,11 +404,11 @@ For entities of reference types, the value of x will be a void refe [[Image:tutorial-9]] -For entities of expanded types, the values are objects; the object attached to x will be overwritten with the contents of the object attached to y . In the case of atomic objects, as in n := 3 with the declaration n: INTEGER , this has the expected effect of assigning to n the integer value 3 ; in the case of composite objects, this overwrites the fields for x , one by one, with the corresponding y fields. +For entities of expanded types, the values are objects; the object attached to x will be overwritten with the contents of the object attached to . In the case of atomic objects, as in n := 3 with the declaration n: INTEGER , this has the expected effect of assigning to n the integer value 3; in the case of composite objects, this overwrites the fields for x, one by one, with the corresponding y fields. To copy an object, use x.copy (y) which assumes that both x and y are non-void, and copies the contents of y's attached object onto those of x's. For expanded entities the effect is the same as that the of the assignment x := y. -An operation performing similar duty to the copy is twin . The assignment +An operation performing similar duty to the copy is twin . The assignment x := y.twin @@ -424,7 +424,9 @@ So, assuming both entities of reference types and y not void, the a To determine whether two values are equal, use the expression x = y . For references, this comparison will yield true if the values are either both void or both attached to the same object; this is the case in the last figure in the state after the assignment, but not before. The symbol for not equal is /= , as in x /= y . -As with assignment, there is also a form that works on objects rather than references: x.is_equal (y) will return true when x and y are both non-void and attached to field-by-field identical objects. This can be true even when x = y is not, for example, in the figure, before the assignment, if the two objects shown are field-by-field equal. +As with assignment, there is also a form that works on objects rather than references: x.is_equal (y) will return true when x and y are both non-void and attached to field-by-field identical objects. This can be true even when x = y is not, for example, in the figure, ''before'' the assignment, if the two objects shown are field-by-field equal. + +The expression x.is_equal (y) can also be expressed in a notation analogous to x = y. The expression x ~ y will be true only in cases in which x.is_equal (y) is true. A more general variant of is_equal is used under the form equal (x, y) . This is always defined, even if x is void, returning true whenever is_equal would but also if x and y are both void. (In contrast, x.is_equal (y) is not defined for void x and would, if evaluated, yield an exception as explained in [[8 Design by Contract (tm), Assertions and Exceptions#Exception_handling|"Exception handling"]] below.)