Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Eiffel > Re: Precursor, ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 7 Topic 851 of 913
Post > Topic >>

Re: Precursor, symmetry of is_equal

by Gerald Hammer <hammer@[EMAIL PROTECTED] > Feb 17, 2007 at 10:54 AM

Daniel F Moisset schrieb:

[...]
> 
> Just to clarify, let me post some code. It crashes at least in SE 2.x.
> If you have other compilers handy (I do not right now), I would like
> to know what the results are:
> 
[...]
> 
> class MAIN
> 
> create make
> 
> feature
> 
>     make is
>         local
>             o1, o2: CHILD
>             x: BOOLEAN
>         do
>             create o1.make_2 ("x", "y", "z")
>             create o2.make_2 ("x", "y", "not z")
>             x := o1.is_equal (o2)
>             if x then print ("Yay!") end
>         end
> 
> end
> 

Replace "make_2" by "make". Then it compiles and runs with
ISE EiffelStudio 5.7 and does not print "Yay!".
The postcondition of "is_equal" of PARENT is violated.

Regards

-- 
Gerald Hammer




 7 Posts in Topic:
Precursor, symmetry of is_equal
"Daniel F Moisset&qu  2007-02-15 09:32:28 
Re: Precursor, symmetry of is_equal
Peter Horan <peter@[EM  2007-02-16 00:17:26 
Re: Precursor, symmetry of is_equal
Georg Bauhaus <bauhaus  2007-02-16 17:56:42 
Re: Precursor, symmetry of is_equal
Roger Browne <roger@[E  2007-02-16 17:19:06 
Re: Precursor, symmetry of is_equal
"Daniel F Moisset&qu  2007-02-16 12:59:17 
Re: Precursor, symmetry of is_equal
Gerald Hammer <hammer@  2007-02-17 10:54:41 
Re: Precursor, symmetry of is_equal
Gerald Hammer <hammer@  2007-02-23 10:32:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 0:47:55 CDT 2008.