After SToring and reloading the keyboard file, simply DeFine the demo
code -- be sure to highlight the entire block of code! -- and hit your
RUNCODE key.
CMline demos appear in the form "command [arg]<Helpkey>." Run the demo
by typing the indicated command and argument on the CMline and hitting
<Helpkey>.
Running the Utilities
=====================
To get a feel for the real-world possibilities of RexXPL, try the ALARM
and FIND2 utilites included in REXXPL.U2.
ALARM lets you set audible reminders from the XyWrite command line.
After installing RexXPL, clear the command line, type HELP ALARM, and
hit <Helpkey> for instructions on use.
FIND2 is a souped-up version of Xy's native file FIND command. It
spans drives, searches in the background (you can work while you wait
for results), and recognizes long filenames. HELP FIND2<Helpkey>
provides on-line help.
* * * * * *
INFORMATION FOR DEVELOPERS
RexXPL Syntax and Demo Routines
===============================
R2X imposes three rules on ordinary REXX usage:
1. Variable names corresponding to S/Gs take the form "xy.n", where
n is the S/G number: xy.00, xy.01, xy.100, xy.a, xy.9, etc.
2. RexXPL variable names not appearing literally in the REXX code
(e.g., names manufactured by iteration through a DO loop) must be
included in a REXX comment; the comment may include a numeric range
of S/G numbers in the form /* xy.n#n */. For example, "/* xy.71#75;
xy.100 */" would instruct R2X to process S/Gs 71-75 and 100, in
*addition* to any other S/G numbers appearing explicitly as per
Rule 1.
3. EXIT instructions must be replaced with SIGNAL EXIT.
These rules are illustrated in the demo routines that follow.
In demo [1], we use REXX to manipulate and reassign the contents of four XyWrite programming S/Gs (01-04). Here's a plain-English account of what happens:
First, we save four strings, in alphabetical order, to S/Gs 01-04:
" AESV01,APPLES AF AESV02,BANANAS AF AESV03,CHERRIES AF AESV04,DATES AF". Next, we
shell to REXX and PUSH the contents of the 4 Save/Gets onto the REXX
"queue", or data stack. Each successive entry sits atop the preceding
one, so that after the fourth PUSH operation, the queue can be
visualized thus:
DATES
CHERRIES
BANANAS
APPLES
Next, we PULL out the entries one by one, and reassign them to REXX
variables xy.01 through xy.04. Because PULL is a LIFO command (last
in, first out), the topmost entry comes out first. Thus, the data are
reassigned in *reverse* alphabetical order (xy.01='DATES',
xy.02='CHERRIES', etc.). Finally, R2X ports the new S/G assignments
back to XyWrite, and the "before" and "after" values are displayed.