ARexx
| Company type | Software |
|---|---|
| Industry | Computer programming |
| Founded | 1987 |
| Founder | William S. Hawes |
| Headquarters | Amiga platform |
| Products | ARexx interpreter |
ARexx is an Amiga Rexx interpreter developed in 1987 by William S. Hawes, incorporating enhancements specific to the Amiga platform that extend beyond the conventional Rexx language. Scripts written in ARexx can communicate with software that implements an ARexx port, enabling applications to offer commands and functions accessible to these scripts. This functionality facilitates workflows that span multiple programs—for instance, retrieving information from a database, manipulating it within a spreadsheet, and producing output in a word processor.
Applications compatible with ARexx accept and execute commands sent by ARexx scripts. Prominent examples of such software include the MicroFiche Filer database system, the Textra text editor distributed alongside JForth, and the multimedia presentation tool AmigaVision.
Mirroring standard Rexx behavior, ARexx treats all data as strings due to its typeless data model, which simplifies programming but may lead to performance drawbacks during execution. Variables are instantiated dynamically upon their initial use without needing explicit declaration beforehand.
The interpreter offers built-in commands and interfaces with the Amiga system's rexxsyslib.library as well as other system libraries. Programs featuring an ARexx port can expose their functionalities to scripts, which themselves can call additional ARexx scripts to extend capabilities.
History
Created in 1987 by William S. Hawes for the Amiga platform, ARexx derives from Mike Cowlishaw's Rexx language as described in The REXX Language: A Practical Approach to Programming. Commodore included ARexx starting with AmigaOS 2.0 in 1990, and it has been part of every subsequent AmigaOS release. This implementation adheres closely to the official Rexx standard, with Hawes later contributing to the development of the ANSI Rexx specification.
From the ARexx manual:
Development took place on an Amiga 1000 equipped with 512k of RAM and two floppy drives. The initial prototype was programmed in C using Lattice C; however, the final version was written in assembly language utilizing the Metacomco assembler. Documentation was prepared using TxEd and formatted through TeX with AmigaTeX.
This product is entirely developed for the Amiga.
Because ARexx is implemented in 68000 assembly language, it does not fully support PPC processors found in modern Amiga-like systems such as MorphOS. It has not been ported to PPC architecture and is thus excluded from MorphOS distributions. With William Hawes no longer involved in Amiga software development and no corporate backing for updates, no new versions of ARexx have been produced. Despite this, existing versions continue to operate on supported platforms.
Implement new capabilities
For instance, a user employing an animation application that combines bitmap images but lacks image editing features can create an ARexx script to streamline this process:
- Search directories for image files
- Load the first image
- Launch a paint application
- Edit the image within the paint program
- Save the altered image to a different directory
- Repeat these steps for each image
- Close the paint application and open the animation software
- Compile and save the animation sequence
- Exit the animation program
Automate repetitive tasks
EqFiles.rexx stands out as a prominent ARexx script created to streamline repetitive operations. It leverages the ALeXcompare utility to detect duplicate files within a collection, presenting the findings clearly for straightforward examination.
Enhancing AmigaOS
ARexx extends the functionality of AmigaOS by introducing features that are otherwise absent, such as issuing alerts or playing notifications when an application crashes, halts, or completes its task. For instance, the following ARexx script generates alerts triggered by specific events:
<syntaxhighlight lang="arexx"> /* Alarm.rexx */ ARG event IF event = 0 THEN EXIT IF event = 1 THEN SAY "Program has ended unexpectedly" IF event = 2 THEN SAY "Program has finished its job" IF event = 3 THEN SAY "Cannot find data in selected directory" </syntaxhighlight>