Previous Top Next

Running

Rexx interpreter calling syntax is:

rexx [-trace] rexx-program [args...]

Where:
trace is any of the valid trace commands, see below the trace cmd.
rexx-program is the filename of the rexx program to run. Extension is also needed.
args are the arguments passed to rexx program

Examples

rexx awari.r runs the awari program
rexx -a awari.r runs awari with trace=all
rexx ?r awari.r runs awari with interactive results trace
rexx banner.r Hi runs banner program with argument Hi

When no trace is specified but only a single "-", rexx will wait for a program to be typed in STDIN (standard input) or if args exist will be executed as one line program.

Examples

To write one line program

rexx - DO i = 1 TO 10; SAY i; END

or you can use rexx as a calculator

rexx - SAY sin(0.5)*sqrt(3**2+4**2)

If no arguments follows the "-" then rexx will wait for input from STDIN. End your program with a Ctrl-Z (Ctrl-D for UNIX)

rexx - (press return, and type...)

DO x=0 TO 6.28 BY 0.1
y = trunc(39*(sin(x)+1)) + 1
SAY copies(' ',y) || '*'
END
Ctlr-Z

and a sine diagram will be displayed.

Previous Top Next