Product Site

Chapter 1. Open Object Rexx General Concepts

1.1. What Is Object-Oriented Programming?
1.2. Modularizing Data
1.3. Modeling Objects
1.4. How Objects Interact
1.5. Methods
1.6. Data Abstraction
1.7. Classes and Instances
1.8. Polymorphism
1.9. Subclasses, Superclasses, and Inheritance
1.10. Structure and General Syntax
1.10.1. Characters
1.10.2. Whitespace
1.10.3. Comments
1.10.4. Tokens
1.10.5. Implied Semicolons
1.10.6. Continuations
1.11. Terms, Expressions, and Operators
1.11.1. Terms and Expressions
1.11.2. Operators
1.11.3. Parentheses and Operator Precedence
1.11.4. Message Terms
1.11.5. Message Sequences
1.11.6. Array Term
1.11.7. Variable Reference Term
1.12. Clauses and Instructions
1.12.1. Null Clauses
1.12.2. Directives
1.12.3. Labels
1.12.4. Instructions
1.12.5. Assignments
1.12.6. Message Instructions
1.12.7. Keyword Instructions
1.12.8. Commands
1.13. Assignments and Symbols
1.13.1. Extended Assignments
1.13.2. Constant Symbols
1.13.3. Simple Symbols
1.13.4. Stems
1.13.5. Compound Symbols
1.13.6. Environment Symbols
1.14. Namespaces
1.15. Message Instructions
1.16. Commands to External Environments
1.16.1. Environment
1.16.2. Commands
1.17. Using Rexx on Windows and Unix-like systems
1.17.1. Calling other Rexx scripts
1.17.2. Shebang support
1.17.3. Line-end characters
1.17.4. End-of-file character

The Rexx language is particularly suitable for:
  • Application scripting
  • Command procedures
  • Application front ends
  • User-defined macros (such as editor subcommands)
  • Prototyping
  • Personal computing

As an object-oriented language, Rexx provides data encapsulation, polymorphism, an object class hierarchy, class-based inheritance of methods, and concurrency. It includes a number of useful base classes and allows you create new object classes of your own.

Open Object Rexx is compatible with earlier Rexx versions, both non-object based Rexx and IBM's Object Rexx. It has the usual structured-programming instructions, for example IF, SELECT, DO WHILE, and LEAVE, and a number of useful built-in functions.

The language imposes few restrictions on the program format. There can be more than one clause on a line, or a single clause can occupy more than one line. Any indentation scheme is allowed. You can, therefore, code programs in a format that emphasizes their structure, making them easier to read.

There is no limit to the size of variable values, as long as all values fit into the storage available. There are no restrictions on the types of data that variables can contain.

A language processor (interpreter) runs Rexx programs. That is, the program runs line by line and word by word, without first being translated (compiled) to machine language. One of the advantages of this is that you can fix the error and rerun the program faster than when using a compiler.

Note: Open Object Rexx also supplies the rexxc program that can be used to translate Rexx programs into a sourceless executable file. Translating a program is not the same as compiling a program to machine language. A translated Rexx program will still be interpreted line by line, though it will typically start faster as the initial parsing has already been done.