MAINSAIL Language Manual, Section 32.20

previous   next   top   contents   index   framed top   this page unframed


32.20. $classDscrFor

Figure 32–15. $classDscrFor
SPECIAL
POINTER($classDscr)
PROCEDURE   $classDscrFor
                        (
CLASS c);

$classDscrFor returns the CLASS descriptor for c. This PROCEDURE returns the same POINTER as $dscrPtr(new(c)), but no new record of the CLASS needs to be allocated.

The implementation of $classDscrFor is fairly efficient, but a call to it does involve a small amount of computation. If a given CLASS descriptor POINTER is to be used often (e.g., in a tight loop), it is a bit more efficient to do p := $classDscrFor(c) and reuse p than to call $classDscrFor repeatedly.

The CLASS form of cvp (see Section 32.93) is equivalent to $classDscrFor; for any CLASS c, cvp(c) = $classDscrFor(c) is true.


previous   next   top   contents   index   framed top   this page unframed

MAINSAIL Language Manual, Section 32.20