|
UnixReview.com
January 2006
Regular Expressions: Rexx Still Going Strong
by Cameron Laird and Kathryn Soraiz
Because you're compulsive about four-letter names.
Or because you're a refugee from the orphanages of OS/2 or Amiga, who likes
the reliability of Unix, but misses a few more friendly faces. Or because you're
curious about how good a lightweight language can be after a quarter century
of refinement. Or because you have responsibilities that stretch across Windows,
OS/400, MVS, Linux, and even rarer operating systems.
Or simply because you want to get work done and are curious about whether Rexx might fit your situation better than the scripting language you're using now. All of these are good reasons to set aside a morning and introduce yourself to the oldest "personal programming language".
Like Cobol, in a good way
Consider:
DO i = 1 TO SourceLine()
SAY "The "i"-th line is '"SourceLine(i)"'."
END
EXIT
Although most of you haven't learned Rexx before, you probably guessed its output correctly:
The 1-th line is 'DO i = 1 TO SourceLine()'.
The 2-th line is ' SAY "The "i"-th line is '"SourceLine(i)"'."'.
The 3-th line is 'END'.
The 4-th line is 'EXIT'.
Rexx programs use English-language words, like "END", where many
languages punctuate, as with '}'. Rexx source otherwise is conventional-looking,
for anyone familiar with sh, Perl, C, or similar languages. Regina
is a portable, open source project that's packaged well for Linux and many
other operating systems (including OpenVMS, BeOS, QNX, and more) and is present
in several popular Linux distributions.
|