What's changed recently November 2, Version 3. June 22, Version 3. This release fixes a major bug with reporting errors introduced in v3. June 4, Version 3. October 14, Version 3. This release contains bug fixes and several additional features. Rexx permits counted loops, where an expression is computed at the start of the loop and the instructions within the loop are executed that many times:. A program can break out of the current loop with the leave instruction, which is the normal way to exit a do forever loop, or can short-circuit it with the iterate instruction.
Most unusually, Rexx allows both conditional and repetitive elements to be combined in the same loop: [7]. The NOP instruction performs "no operation", and is used when the programmer wishes to do nothing in a place where one or more instructions would be required. Variables in Rexx are typeless, and initially are evaluated as their names, in upper case. Thus a variable's type can vary with its use in the program:. Unlike many other programming languages, classic Rexx has no direct support for arrays of variables addressed by a numerical index.
Instead it provides compound variables. A compound variable consists of a stem followed by a tail. If the tails used are numeric, it is easy to produce the same effect as an array.
Afterwards the following variables with the following values exist: stem. Unlike arrays, the index for a stem variable is not required to have an integer value. For example, the following code is valid:. By convention and not as part of the language the compound stem. Features similar to Rexx compound variables are found in many other languages including associative arrays in AWK, hashes in Perl and Hashtables in Java. Most of these languages provide an instruction to iterate over all the keys or tails in Rexx terms of such a construct, but this is lacking in classic Rexx.
Instead it is necessary to keep auxiliary lists of tail values as appropriate. For example, in a program to count words the following procedure might be used to record each occurrence of a word. Rexx provides no safety net here, so if one of the words happens to be a whole number less than dictionary.
Recent implementations of Rexx, including IBM 's Object REXX and the open source implementations like ooRexx include a new language construct to simplify iteration over the value of a stem, or over another collection object such as an array, table or list.
Its syntax is:. The other reasons being Rexx's decimal arbitrary precision arithmetic including fuzzy comparisons , use of the PARSE statement with programmatic templates, stemmed arrays, and sparse arrays.
This displays 16 and exits. Rexx and other scripting languages tend to be poor choices when programming directly to hardware, for example, when writing a device driver for an operating system. Rexx runs on nearly any platform, from phones and handhelds to laptops to PCs to servers to mainframes. As with every free or open source language, there is no way to compile accurate statistics, so no one knows.
Rexx predominates on the systems with which it is bundled listed in the answer to the previous question. Our Tools section lists many of them and gives hot links to download them. Rexx comes in three basic varieties -- 1. Object Rexx. This is a superset of classic Rexx, fully extended for object-oriented programming. All object-oriented programming features are completely supported, including messaging, classes, objects, single and multiple inheritance, data hiding and encapsulation, polymorphism and operator overloading and a large class library.
All Classic Rexx programs will run under object Rexx without alteration. This is a "Java-compatible," Rexx-like language.
It coexists interchangeably with Java code and runs under the Java Virtual Machine. You can develop applications, applets, servlets, and beans with NetRexx, then intermix their use in any way desired with Java components. NetRexx uses Java classes and can be used to develop classes for use by Java programs. NetRexx will even generate fully commented Java code.
How many free Rexx interpreters are there? There are 7 free Rexx interpreters, 2 free object-oriented Rexx interpreters, and the free Java compatible NetRexx. Download any of them from our Downloads section. Rexx is standardized by the ANSI standard and is not controlled by any one company or individual. Since it is a widely-used, useful language, this has resulted in the availability of several free interpreters.
This is a great benefit because you can select the interpreter you like -- one optimized for speed, extended for a particular operating system, or whatever. The main downside is that not every free tool works with every interpreter.
Yes, among them Regina and ooRexx. See the Downloads page for information and download links. Yes, Rexx runs on most handheld operating systems, see here and here. Every free Rexx interpreter at least conforms to TRL The single exception is NetRexx, a "Rexx-like" language designed to integrate into the Java environment. Rexx's standardization yields portable code and renders your Rexx skills transferable across systems.
0コメント