I am not experienced enough in gnu-APL to determine whether you intend
for this type of expression to be executable, so I just bring it to your
attention.

http://www.microapl.co.uk/apl_help/ch_020_020_310.htm

If the arguments contain object (or class) references, the elements are
considered equal if the reference indices are the same, i.e. if they
refer to the same entry in APL's internal table of objects. For internal
objects, this will be true if and only if the elements refer to the same
object. Note that different objects which happen to contain the same
properties are not considered equal. For example, if Point is a simple
class with properties X and Y:

             PT←⎕NEW Point
             PT.X←63 ⋄ PT.Y←42
             A←PT
             B←PT.⎕CLONE 1
             A.⎕DS
       X=63, Y=42
             B.⎕DS
       X=63, Y=42
             A=PT      ⍝ References to the same object
       1       
             B=PT      ⍝ Objects are different, but have the same property 
values
       0

For external objects, there might be two references which APL does not
know refer to the same object. Therefore the use of the APL Equals
primitive on external objects is not recommended.


-- 

Reply via email to