ARexx

ARexx is an implementation of the REXX language for the Amiga, 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. Programs written for ARexx are called "scripts", 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 can define a set of commands and functions 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, insert the data into a spreadsheet to perform calculations on it, then insert tables and charts based on the results into a word processor 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 in the book "The REXX Language: A Practical Approach to Programming" [cite book|title=The REXX Language: A Practical Approach to Programming|first=Michael|last=Cowlishaw|publisher=Prentice Hall|year=1985|edition=1st|isbn=ISBN 0-13-780651-5] . ARexx was included by Commodore into AmigaOS 2.0 in 1990. This later version of ARexx follows the official REXX language closely; Hawes was later involved in drafting the ANSI standard for REXX.

ARexx is written in 68000 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 in MorphOS 2.0. William Hawes is no longer involved in development of Amiga programs because of quarrels in the past with Commodore about the licensing of ARexx,Fact|date=February 2007 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 or post-Commdore releases of AmigaOS.

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.

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

Lack of features in a program

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 [cite web|title=EqFiles|url=http://main.aminet.net/util/rexx/EqFiles.lha|first=Fulvio|last=Peruggi] is a well known example of a simple ARexx script written to automate repetitive and boring procedures. This script uses the ALeXcompare program [cite web|title=ALeXcompare|first=Alex|last=Kazik|url=http://main.aminet.net/util/cli/ALeXcompare.lha] to compares 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 an OS (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 very minimal ARexx script that displays warnings on the monitor screen 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

References

External links

* [http://members.cox.net/midian/tutorials/arexx1.htm Beginning ARexx Tutorial]
* [ftp://ftp.aminet.net/docs/help/arexxreference.lha Command and Function Reference]


Wikimedia Foundation. 2010.

Look at other dictionaries:

  • ARexx — ist eine Portierung der Programmiersprache REXX für den Amiga Computer und wurde 1987 von William S. Hawes entwickelt. ARexx ist, wie REXX, eine Interpreter basierte Programmiersprache. Programme die in ARexx entwickelt werden, nennt man Skript… …   Deutsch Wikipedia

  • ARexx — Autor William S. Hawes Información general Género ? Programado en Ensamblador …   Wikipedia Español

  • AREXX — abbr. Amiga Restructured EXtended eXecutor (language) (Amiga, Commodore, REXX) …   United dictionary of abbreviations and acronyms

  • AmigaOS — Скриншот AmigaOS 3.9 Разработчик Commodore International …   Википедия

  • AmigaOS versions — There have been many different versions of the AmigaOS operating system during its two decades of history.The first AmigaOS was nicknamed Workbench from the name of its GUI Interface, due to an error of Commodore Marketing and Sales Department,… …   Wikipedia

  • AmigaOS 4 — A screenshot of AmigaOS 4.1 Update 2. Company / developer Hyperion Entertainment Programmed in C OS family …   Wikipedia

  • AmigaOS — Infobox OS name = AmigaOS logo = caption = A screenshot of AmigaOS 4.0 family = Amiga OS developer = Commodore International (1.0 3.1) Haage Partner (3.5 3.9) Hyperion Entertainment (4.0) source model = Closed source working state = Current… …   Wikipedia

  • Amiga-Computer — Letztes offizielles Logo Der Commodore Amiga (spanisch amiga: Freundin) war ein von Mitte der 1980er bis Anfang/Mitte der 1990er weit verbreiteter Computer, der besonders in seinen Einsteigermodellen (A500 und A1200) als Heimcomputer beliebt war …   Deutsch Wikipedia

  • AmigaDOS — AmigaOS Basisdaten Entwickler Commodore International (1.0 3.1) Haage Partner (3.5 3.9) …   Deutsch Wikipedia

  • AmigaOS — Basisdaten Entwickler Commodore International (1.0 3.1) Haage &am …   Deutsch Wikipedia


Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”

We are using cookies for the best presentation of our site. Continuing to use this site, you agree with this.