bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-apl] PT←⎕NEW Point -- An example lifted from microapl returns


From: David B. Lamkins
Subject: Re: [Bug-apl] PT←⎕NEW Point -- An example lifted from microapl returns value errors.
Date: Wed, 28 May 2014 21:55:05 -0700

That is a language extension specific to MicroAPL. It is not part of
either ISO Extended APL or IBM APL 2, which are the references upon
which GNU APL is based.

The README-7-more-info file in the GNU APL distribution contains links
to the reference documents.


On Wed, 2014-05-28 at 20:15 -0700, Akiva Avraham wrote:
> 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

[Prev in Thread] Current Thread [Next in Thread]