A. Installation and Use for IBM XT/AT We describe here how to install and use Refal-5 on IBM AT or XT under MS-DOS. There is an adaptation of this system
for the Apple Macintosh. Its description comes with the diskette for the Macintosh. 1. Installation
The system diskette contains the following files: README
REFC EXE REFGO EXE
REFTR EXE RDHELP TXT TEST REF
TEST RSL E REF MBPREP REF
REFLIB REF
1. Copy the three EXE files into any subdirectory which is in the PATH . 2. Copy all other files except README
into any subdirectory; let it be REFAL . 3. Switch to REFAL and execute:
refc E refc MBPREP refc REFLIB This will add the files E.RSL , MBPREP.RSLand
REFLIB.RSL to REFAL .
4. Put the line:
SET RD_HELP=REFAL\RDHELP.TXT in your AUTOEXEC.BAT file. This will enable you to read a help file from the Refal Tracer.
5. You are all set now. To check that things work as expected, run:
refgo test This will start an interactive program for the translation of simple arithmetic expressions.
2. Use In the following XXX , YYY , etc. are some file names (without extensions). Using any editor, create a Refal program in XXX.REF . To compile, execute: refc XXX
If there are no errors, no message will be sent. The file XXX.RSL
that contains the translation of the Refal program into the interpreted language RASL will be added to the current directory. If there is an error message, see file XXX.LIS
for the listing of the Refal program with the descriptions of errors. To run the Refal program execute: refgo XXX
If you need functions defined in other modules: YYY , ZZZ , etc. compile
YYY , ZZZ , etc. and run: refgo XXX+YYY+ZZZ etc. In particular, do not forget to include the module reflibif you use some of the standard functions defined there.
NOTE:
Make sure there are no blanks between file names and pluses.
You can specify options with refgo : refgo -nt XXX+YYY etc. or:
refgo XXX+YYY etc. -nt
Then the number of steps and the execution time will be printed out at the end. -n will print out only the number of steps, -t the execution time.
To run the program by the tracer, use REFTR instead of
refgo : reftr XXX+YYY+ZZZ etc. (see Reference Section D for the description of the tracer).
To run with arguments, execute:
refgo XXX+YYY etc. Arg1 Arg2 etc. reftr XXX+YYY etc. Arg1 Arg2 etc. An argument cannot start with - . To access the arguments from the Refal program, use <Arg sN> (see Reference Section C).
To evaluate any function calls defined in some file XXXusing the evaluator E (consult Sec. 6.3), see that this file includes the line:
$ENTRY Upd { eX = <Up eX>; } Then enter:
refgo e+XXX+... or:
reftr e+XXX+...
|