ARexx
   HOME

TheInfoList



OR:

ARexx is an implementation of the
Rexx Rexx (Restructured Extended Executor) is a programming language that can be interpreted or compiled. It was developed at IBM by Mike Cowlishaw. It is a structured, high-level programming language designed for ease of learning and reading. ...
language for the
Amiga Amiga is a family of personal computers introduced by Commodore in 1985. The original model is one of a number of mid-1980s computers with 16- or 32-bit processors, 256 KB or more of RAM, mouse-based GUIs, and significantly improved graphi ...
, written in 1987 by William S. Hawes, with a number of Amiga-specific features beyond standard REXX facilities. Like most REXX implementations, ARexx is an
interpreted language In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program. An interprete ...
. Programs written for ARexx are called "
scripts Script may refer to: Writing systems * Script, a distinctive writing system, based on a repertoire of specific elements or symbols, or that repertoire * Script (styles of handwriting) ** Script typeface, a typeface with characteristics of handw ...
", or " macros"; several programs offer the ability to run ARexx scripts in their main interface as macros. ARexx can easily communicate with third-party software that implements an "ARexx port". Any Amiga application or script can define a set of
command Command may refer to: Computing * Command (computing), a statement in a computer language * COMMAND.COM, the default operating system shell and command-line interpreter for DOS * Command key, a modifier key on Apple Macintosh computer keyboards * ...
s and
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
s for ARexx to address, thus making the capabilities of the software available to the scripts written in ARexx. ARexx can direct commands and functions to several applications from the same script, thus offering the opportunity to mix and match functions from the different programs. For example, an ARexx script could extract data from a
database In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases sp ...
, insert the data into a
spreadsheet A spreadsheet is a computer application for computation, organization, analysis and storage of data in tabular form. Spreadsheets were developed as computerized analogs of paper accounting worksheets. The program operates on data entered in cel ...
to perform calculations on it, then insert tables and charts based on the results into a
word processor A word processor (WP) is a device or computer program that provides for input, editing, formatting, and output of text, often with some additional features. Word processor (electronic device), Early word processors were stand-alone devices ded ...
document.


History

ARexx was first created in 1987, developed for the Amiga by William S. Hawes. It is based on the REXX language described by
Mike Cowlishaw Mike Cowlishaw is a visiting professor at the Department of Computer Science at the University of Warwick, and a Fellow of the Royal Academy of Engineering. He is a retired IBM Fellow, and was a Fellow of the Institute of Engineering and Technol ...
in the book ''The REXX Language: A Practical Approach to Programming''. ARexx was included by
Commodore Commodore may refer to: Ranks * Commodore (rank), a naval rank ** Commodore (Royal Navy), in the United Kingdom ** Commodore (United States) ** Commodore (Canada) ** Commodore (Finland) ** Commodore (Germany) or ''Kommodore'' * Air commodore ...
with
AmigaOS AmigaOS is a family of proprietary native operating systems of the Amiga and AmigaOne personal computers. It was developed first by Commodore International and introduced with the launch of the first Amiga, the Amiga 1000, in 1985. Early version ...
2.0 in 1990, and has been included with all subsequent AmigaOS releases. This later version of ARexx follows the official REXX language closely; Hawes was later involved in drafting the
ANSI The American National Standards Institute (ANSI ) is a private non-profit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States. The organi ...
standard for REXX. ARexx is written in
68000 The Motorola 68000 (sometimes shortened to Motorola 68k or m68k and usually pronounced "sixty-eight-thousand") is a 16/32-bit complex instruction set computer (CISC) microprocessor, introduced in 1979 by Motorola Semiconductor Products Secto ...
Assembly, and cannot therefore function at full speed with new PPC CPUs, a version of ARexx has not been rewritten for them and is still missing from
MorphOS MorphOS is an AmigaOS-like computer operating system (OS). It is a mixed Proprietary software, proprietary and Open-source software, open source OS produced for the Pegasos PowerPC (PPC) processor based computer, PowerUP accelerator equipped Amig ...
3.0. William Hawes is no longer involved in development of Amiga programs and no other Amiga-related firm is financing new versions of ARexx. Notwithstanding this fact, the existing version of ARexx continues to be used, although it is not distributed with MorphOS. From the ARexx manual:
ARexx was developed on an Amiga 1000 computer with 512k bytes of
memory and two floppy disk drives. The language prototype was
developed in C using
Lattice C The Lattice C Compiler was released in June 1982 by Lifeboat Associates and was the first C compiler for the IBM Personal Computer. The compiler sold for $500 and would run on PC DOS or MS-DOS (which at the time were the same product with differe ...
, and the production version was written
in assembly-language using the Metacomco assembler. The documentation
was created using the TxEd editor, and was set in
TeX Tex may refer to: People and fictional characters * Tex (nickname), a list of people and fictional characters with the nickname * Joe Tex (1933–1982), stage name of American soul singer Joseph Arrington Jr. Entertainment * ''Tex'', the Italian ...
using
AmigaTeX __NOTOC__ The computer program AmigaTeX is a port of Knuth's typesetting program TeX, and was originally written in WEB and translated to C by Tomas Rokicki. This translation was necessary because of the lack of a suitable Pascal compiler for ...
.
This is a 100% Amiga product.


Characteristics

ARexx is a programming language that can communicate with other applications. Using ARexx, for example, one could request data from a database application and send it to a spreadsheet application. To support this facility, an application must be "ARexx compatible" by being able to receive commands from ARexx and execute them. A database program might have commands to search for, retrieve, and save data — the MicroFiche Filer database has an extensive ARexx command set. A text editor might have ARexx commands corresponding to its editing command set — the Textra editor supplied with JForth can be used to provide an integrated programming environment. The AmigaVision multimedia presentation program also has ARexx port built in and can control other programs using ARexx. ARexx can increase the power of a computer by combining the capabilities of various programs. Because of the popularity of a stand-alone ARexx package, Commodore included it with Release 2 of
AmigaDOS AmigaDOS is the disk operating system of the AmigaOS, which includes file systems, file and directory manipulation, the command-line interface, and file Redirection (computing), redirection. In AmigaOS 1.x, AmigaDOS is based on a TRIPOS port by ...
. Like all REXX implementations, ARexx uses ''typeless'' data representation. Other programming languages made distinctions between integers, floating point numbers, strings, characters, vectors, ''etc''. In contrast, REXX systems treat all data as strings of characters, making it simpler to write expressions and algorithms. As is often the case in dynamically scoped languages, variables are not declared before using them, they come into being on their first use. ARexx scripts benefit from an error handling system which monitors execution and responds accordingly. The programmer can choose to suspend and resume the execution of the program as needed. The ARexx command set is simple, but in addition to the commands there are the functions of its Amiga reference library (rexxsyslib.library). It is also easy to add other libraries or individual functions. ARexx scripts can also be invoked as functions from other ARexx scripts. Any Amiga program which has an ARexx port built in can share its functions with ARexx scripts.


Examples of ARexx solutions to common problems


Implementing new features and capabilities via scripts

If end user is using a program which builds animations by joining various bitmap image files but which lacks image processing capabilities, he could write an ARexx script which performs these actions: #ARexx locates the image files in their directories #ARexx loads first image #ARexx loads paint program #The image is loaded into paint program which performs modifications to file #The modified image is stored into another directory #ARexx repeats procedure on any image in the directory #The paint program is closed and the animation program is loaded #The animation is built #The animation is saved in its directory #The animation program is closed


Avoiding repetitive procedures

EqFiles.rexx is a well-known example of a simple ARexx script written to automate repetitive and boring procedures. This script uses the ALeXcompare program to compare files, and then finds all duplicates in a set of files and returns output by highlighting any results in a different color.


Expand AmigaOS capabilities

One of the main features of ARexx is the fact it could expand the capabilities of the AmigaOS by adding some procedures the OS lacked. For example, a simple ARexx program could be written to print a warning message on the screen of the monitor, or play an audio alert signal if a certain Amiga program stops, faults or has finished its scheduled job. The following script is a minimal ARexx script that displays warnings depending on events that take place. /* 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"


See also

*
REXX Rexx (Restructured Extended Executor) is a programming language that can be interpreted or compiled. It was developed at IBM by Mike Cowlishaw. It is a structured, high-level programming language designed for ease of learning and reading. ...


References

;Notes * *


External links


Beginning ARexx Tutorial

Command and Function Reference

Design Tool
{{DEFAULTSORT:Arexx Amiga APIs Amiga development software AmigaOS 4 software AmigaOS MorphOS Scripting languages CBM software Assembly language software Rexx Inter-process communication