namelist ← objref.⎕NL N
namelist ← classref.⎕NL N
⎕NL returns a list of the public members of a class as a character matrix. (See also
⎕DESC which provides additional information about the parameters of each method). It can be used as a method either of a class, or of an instance of a class. However, exceptionally, if it is used as a standalone system function within a user-defined method, it is NOT equivalent to
⎕THIS.⎕NL. This is because in this case, the traditional system function
⎕NL will be invoked, which lists ordinary variables, functions, and operators, not class members.
The right argument is a scalar or vector which indicates which types of class member should be included in the result:
||Type of member
Point.⎕NL 2 ⍝ Applied to a class reference (properties)
PT.⎕NL 2 3 ⍝ Applied to an object ref (properties and methods)
⎕NL may also be used to list the members of External or System classes:
PT←'java' ⎕NEW 'java.awt.Point'
PT.⎕NL 2 ⍝ Properties
PT.⎕NL 3 ⍝ Methods
T←'⎕' ⎕NEW 'Timer'
T.⎕NL 2 ⍝ Properties
T.⎕NL 3 ⍝ Methods
T.⎕NL 8 ⍝ Events
For the R interface,
⎕NL can be used to produce a list of all the R global variables in the current R session (right argument 2), or all the functions which are available in the currently-loaded packages (right argument 3). This will usually be a long list (several thousand functions).