Polymorphism: Difference between revisions

Content added Content deleted
Line 2,309: Line 2,309:
Class:
Class:
Module PointA {
Module PointA {
\\ ? means optionaly
\\ ? means optionally
Read ? .[x], .[y]
Read ? .[x], .[y]
}
}
Line 2,317: Line 2,317:
Operator "=" (n1) {
Operator "=" (n1) {
n=group(n1)
n=group(n1)
n2=This ' get a copy of this to check n agains n2
n2=This ' get a copy of this to check n against n2
if valid(@n as n2) else push false :exit
if valid(@n as n2) else push false :exit
if n.x=.x Then if n.y=.y then if n.r=.r then push true : exit
if n.x=.x Then if n.y=.y then if n.r=.r then push true : exit