Chapter 6. Rexx Runtime Objects

Table of Contents
The Environment Directory (.ENVIRONMENT)
The Local Directory (.LOCAL)
The Error Monitor (.ERROR)
The Input Monitor (.INPUT)
The Output Monitor (.OUTPUT)
The STDERR Stream (.STDERR)
The STDIN Stream (.STDIN)
The STDOUT Stream (.STDOUT)
The STDQUE Queue (.STDQUE)
The Line Number (.LINE)
The METHODS Directory (.METHODS)
The Return Status (.RS)

In addition to the class objects described in the previous chapter, the Rexx runtime environment also provides objects that are accessible via environment symbols (see Environment Symbols).

The Environment Directory (.ENVIRONMENT)

The Environment object is a directory of public objects that are always accessible. The Environment object is automatically searched when environment symbols are used, or the Environment object may be directly accessed using the .ENVIRONMENT symbol. Entries stored in the Environment use the same name as the corresponding environment symbol, but without a leading period. For example:

  say .true              -- Displays "1"
  say .environment~true  -- Also displays "1"

The Environment object directory contains all of the Rexx built-in classes (Array, etc.), plus special Rexx constants such as .NIL, .TRUE, and .FALSE.

The ENDOFLINE Constant (.ENDOFLINE)

The ENDOFLINE object is a string constant representing the line terminator used for file line end markers for a given system. This constant is "0d0a"x on Windows (carriage return/linefeed) and "0a"x (linefeed) on Unix platforms.

The FALSE Constant (.FALSE)

The FALSE object is the constant "0" representing a FALSE result for logical and comparison operations.

The NIL Object (.NIL)

The NIL object is a special object that does not contain data. It usually represents the absence of an object, as a null string represents a string with no characters. It has only the methods of the Object class. Note that you use the .NIL object (rather than the null string ("")) to test for the absence of data in an array or other Collection class entry:

if .nil = board[row,col]   /* .NIL rather than "" */
then ...

The TRUE Constant (.TRUE)

The TRUE object is the constant "1", representing a true result for logical and comparison operations.