Topic: APLX Help : Help on APL language : System Methods : ⎕HANDLE Handle to object
[ Previous | Next | Contents | Index | APL Home ]

www.microapl.co.uk

⎕HANDLE Handle to object


Implemented for Internal, External and System classes.

Syntax:

    integer ← objref.⎕HANDLE
    integer ← classref.⎕HANDLE
    integer ← ⎕HANDLE            (Within user-defined method, same as ⎕THIS.⎕HANDLE)

For External and System classes, ⎕HANDLE returns an integer containing a reference to a class or object, as seen by the external sub-system. For Internal classes it always returns zero. It is used for advanced low-level programming.

Depending on the external architecture, this handle can be used when you need to pass an object reference to custom low-level (non-APL) code, or use ⎕NA to call an external library routine. The meaning of the value returned is as follows:

Architecture Value returned
.Net Integer representing a GCHandle for the object
Java Result of NewGlobalRef call to the JVM
Ruby The Ruby VALUE of the object, cast to an integer

Topic: APLX Help : Help on APL language : System Methods : ⎕HANDLE Handle to object
[ Previous | Next | Contents | Index | APL Home ]