Product Site

6.1. 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 (uppercased) name as the corresponding environment symbol, but without a leading period. For example:

say .object                            -- Displays "The Object class"
say .environment~object                -- Displays "The Object class"
say .environment["OBJECT"]             -- Displays "The Object class"
say .environment["object"]             -- Displays "The NIL object"
say .rexxinfo                          -- Displays "a RexxInfo"
say .rexxinfo~platform                 -- Displays "WindowsNT" (if running on Windows)
say .environment~rexxinfo~platform     -- Displays "WindowsNT" (if running on Windows)
say .environment["REXXINFO"]~platform  -- Displays "WindowsNT" (if running on Windows)

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