Implemented for Internal, External and System classes.
Syntax:
namelist „ objref.ŒDESC N
namelist „ classref.ŒDESC N
namelist „ ŒDESC N (Within user-defined method, same as ŒTHIS.ŒDESC N)
ŒDESC is similar to ŒNL in that it returns a list of the public members of a class as a character matrix. However, it also provides additional information about the parameters of each method, including type information if appropriate. It is especially useful for strongly-typed architectures such as Java and .Net. It can be used as a method either of a class, or of an instance of a class.
The right argument is a scalar or vector which indicates which types of class member should be included in the result, using the same codes as ŒNL:
Code Type of member 2 Properties 3 Function methods 4 Operator methods 8 Events 10 Constructors
For Internal classes, ŒDESC returns just the names for properties, and the function header (excluding the localised names) for function and operator methods:
Point { X Y ’R„MAG R„((X*2)+(Y*2))*0.5 ’ } Point.ŒDESC 2 © Applied to a class X Y PT„ŒNEW 'Point' PT.ŒDESC 2 3 © Applied to an object (properties and methods) R„MAG X Y
For External classes in Java or .Net, ŒDESC shows the types of properties, method parameters, and results. Because a given method name may be overloaded (i.e. exist in different forms, according to the number and types of parameters provided to it), a given method name may appear more than once:
NetPT„'.net' ŒNEW 'System.Drawing.Point' NetPT.ŒDESC 2 © Properties System.Drawing.Point Empty Boolean IsEmpty Int32 X Int32 Y NetPT.ŒDESC 10 © Constructors (overloaded) Void Point(Int32, Int32) Void Point(System.Drawing.Size) Void Point(Int32) NetPT.ŒDESC 3 © Methods System.Drawing.Point Add(System.Drawing.Point, System.Drawing.Size) System.Drawing.Point Ceiling(System.Drawing.PointF) Boolean Equals(System.Object) Boolean get_IsEmpty() Int32 get_X() Int32 get_Y() Int32 GetHashCode() System.Type GetType() Void Offset(Int32, Int32) Void Offset(System.Drawing.Point) System.Drawing.Point op_Addition(System.Drawing.Point, System.Drawing.Size) Boolean op_Equality(System.Drawing.Point, System.Drawing.Point) System.Drawing.Size op_Explicit(System.Drawing.Point) System.Drawing.PointF op_Implicit(System.Drawing.Point) Boolean op_Inequality(System.Drawing.Point, System.Drawing.Point) System.Drawing.Point op_Subtraction(System.Drawing.Point, System.Drawing.Size) System.Drawing.Point Round(System.Drawing.PointF) Void set_X(Int32) Void set_Y(Int32) System.Drawing.Point Subtract(System.Drawing.Point, System.Drawing.Size) System.String ToString() System.Drawing.Point Truncate(System.Drawing.PointF)
For the R interface, ŒDESC can be used to produce a list of all the R functions which are available in the currently-loaded packages, together with the parameters and default values (except for primitive functions). This will usually be a large list (several thousand functions):
r„'r' Œnew 'r' fns„r.Œdesc 3 ½fns 2037 117 fns[1445+¼5;] pwilcox (q, m, n, lower.tail = TRUE, log.p = FALSE) q (save = "default", status = 0, runLast = TRUE) qbeta (p, shape1, shape2, ncp = 0, lower.tail = TRUE, log.p = FALSE) qbinom (p, size, prob, lower.tail = TRUE, log.p = FALSE) qbirthday (prob = 0.5, classes = 365, coincident = 2)