Chapter 2. Meet Open Object Rexx (ooRexx)

Table of Contents
The Main Attractions
Rexx and the Operating System
A Classic Language Gets Classier
The Object Advantage
The Next Step

Rexx is a versatile, free-format language. Its simplicity makes it a good first language for beginners. For more experienced users and computer professionals, Rexx offers powerful functions and the ability to issue commands to several environments.

The Main Attractions

The following aspects of Rexx round out its versatility and functions.

Object-Oriented Programming

Object-oriented extensions have been added to traditional Rexx, but its existing functions and instructions have not changed. The Open Object Rexx interpreter is an enhanced version of its predecessor with support for:

  • Classes, objects, and methods

  • Messaging and polymorphism

  • Inheritance and multiple inheritance

Object Rexx supplies the user with a base set of built-in classes providing many useful functions. Open Object Rexx is fully compatible with earlier versions of Rexx that were not object-oriented.

An English-Like Language

To make Rexx easier to learn and use, many of its instructions are meaningful English words. Rexx instructions are common words such as SAY, PULL, IF...THEN...ELSE, DO...END, and EXIT.

Cross-Platform Versatility

Versions of ooRexx are now available for a wide variety of platforms, and the programs you create with Object Rexx will run on any of these, including Linux™, AIX®, as well as Windows XP®, and Windows Vista®. It is also available in 64-bit versions that can exploit larger address spaces.

Fewer Rules

Rexx has relatively few rules about format. A single instruction can span many lines, and you can include several instructions on a single line. Instructions need not begin in a particular column and can be typed in uppercase, lowercase, or mixed case. You can skip spaces in a line or entire lines. There is no line numbering.

Interpreted, Not Compiled

Rexx is an interpreted language. When a Rexx program runs, its language processor reads each statement from the source file and runs it, one statement at a time. Languages that are not interpreted must be compiled into object code before they can be run.

Built-In Classes and Functions

Rexx has built-in classes and functions that perform various processing, searching, and comparison operations for text and numbers and provide formatting capabilities and arithmetic calculations.

Typeless Variables

Rexx regards all data as objects of various kinds. Variables can hold any kind of object, so you need not declare variables as strings or numbers.

String Handling

Rexx includes capabilities for manipulating character strings. This allows programs to read and separate characters, numbers, and mixed input. Rexx performs arithmetic operations on any string that represents a valid number, including those in exponential formats.

Clear Error Messages and Powerful Debugging

Rexx displays messages with meaningful explanations when a Rexx program encounters an error. In addition, the TRACE instruction provides a powerful debugging tool.

Impressive Development Tools

The ooRexx places many powerful tools at your disposal. These include a Rexx API to other languages like C/C++ or Cobol, OLE/ActiveX support, a mathematical functions package.