forked from mvslovers/brexx370
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
345 lines (276 loc) · 16 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
o o
____oo_
R E X X 1992-2011 /|| |\
Ver. 2.x BNV || |
for MSDOS MARMITA `.___.'
and Unix
Author.........Vasilis N. Vlachoudis
Address........19Q rue du Jura
St.Genis-Pouilly F-1630
France
Computer [email protected]
Http addr......http://home.cern.ch/bnv
Last updated...Jun-2011
What is REXX?
~~~~~~~~~~~~~
REXX is a programming language designed by Michael Cowlishaw of
IBM UK Laboratories. In his own words: "REXX is a procedural
language that allows programs and algorithms to be written in a
clear and structured way."
Syntactically, REXX doesn't look that different from any other
procedural language. Here's a simple REXX program:
/* Count some numbers */
say "Counting..."
do i = 1 to 10
say "Number" i
end
What makes REXX different from most other languages is its
capability for being used as a _macro language_ for arbitrary
applications. The idea here is that application developers don't
have to design their own macro languages and accompanying
interpreters. Instead they use REXX as the basis for that language
and support the REXX programming interface. When a REXX program
runs and comes across an expression or function that isn't part of
the base language definition, it can ask the application if it
knows how to handle it. The application only has to support
features that are specific to it, freeing the developer from
handling the mundane task of writing a language interpreter. And
if all applications use REXX as their macro language, the user only
has to learn one language instead of a dozen.
About this REXX interpreter
~~~~~~~~~~~~~~~~~~~~~~~~~~~
I wrote this version of REXX because I though that it would be
nice to have my own REXX interpreter do use it with DOS, UNIX and
also as a macro language for my programs. This REXX interpreter is
written in ANSI C, and I have tried to make it fast and flexible,
with very little restrictions, without lossing compatibility with
the Ansi-Rexx
How much does it cost
~~~~~~~~~~~~~~~~~~~~~
This is a FREEWARE program, as long as it is used for NON COMMERCIAL
purpose. But any generous contribution is well accepted :) to help
keeping this project alive. It is still FREEWARE if it is included
as a part (macro language) for another FREEWARE product.
For commercial use the registration fee is $50 (for version 2.x
and above). Furthermore, if you want to include it as a macro
language in one of your shareware/commercial program you have to
contact the author [email protected]. For more
informations please contact me by e-mail on one of the above addresses.
Files in this distribution
~~~~~~~~~~~~~~~~~~~~~~~~~~
Versions are included for PC, UNIX and MAC operating systems.
However users are encourage to download the source code and
recompile their own version. See INSTALL for more instructions.
Versions for MVS and CMS can also be built and have their own
instructions in directories "mvs" and "cms" respectively.
Look for *.txt files.
brexx-XYZ.zip VX.Y.Z Binary for MSDOS, examples,
libs and docs compiled with BC++ V3.1
brexx86v-XYZ.zip VX.Y.Z Binary for 8086, examples,
libs and docs compiled with BC++ V3.1
brexx-X.Y.Z.tar.gz VX.Y.Z Source code, examples,
libs and docs
brexx-X.Y.Z.src.rpm VX.Y.Z Source RPM code, examples,
libs and docs
brexx-X.Y.Z.i386.rpm VX.Y.Z Redhat V9.0 RPM, examples,
libs and docs
brexx-XYZ_HPC.zip VX.Y.Z Binary for Windows CE V2.0,2.1 for
SH3 and MIPS processor, examples,
libs and docs and setup program.
brexx-XYZ_HPCPRO.zip VX.Y.Z Binary for Windows HPCPRO CE V2.11 for
SH3,SH4,MIPS and StrongARM processor, examples,
libs and docs and setup program.
brexx-XYZ_PPC.zip VX.Y.Z Binary for Windows PPC CE V2.11 for
SH3 and MIPS processor, examples,
libs and docs and setup program.
brexx-XYZ_POCKETPC.zip VX.Y.Z Binary for Windows Pocket PC CE V3.0 for
SH3,MIPS and StrongARM processor, examples,
libs and docs and setup program.
brexx200_amiga.tgz V2.0.x Binary for AMIGA, examples,
libs and docs. Needs ixemul.library.
(by Generoso Martello)
v13/brexx131.zip Binary, examples, libs and docs
compiled with BC++ V3.1
v13/brexx_1.31_hpux.tar.gz Binary, examples, libs and docs
compiled on HP-UX V9
v13/brexx_1.31_linux.tar.gz Binary, examples, libs and docs
compiled on linux.
v13/brexx_1.31_rsaix32.tar.gz Binary, examples, libs and docs
compiled on IBM AIX
v13/brexx_1.31_src.tar.gz Source that can be compiled on most
of the unix systems and DOS.
brexx_1.3m_mpw.dd.hqx Binary, examples, libs and docs
for MPW Macintosh shell.
brexx_1.3m_src.dd.hqx Source, examples, libs and docs
for MPW Macintosh shell.
32-bit BRexx for DOS and Ms-Windows
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This 32-bit version of BRexx was compiled by Generoso Martello,
with DJGPP V2.x. The advantages of this version are:
o 60-80% FASTER than the 16-bit DOS version
o there isn't anymore the limitation of the 640Kb of
DOS memory and the 64kb (segment) per each manipulated data.
It can use all the memory resources of your computer.
o LONG FILENAME support for Windows-95/98.
Unfortunately, INTR and PORT are not supported in the 32-bit
version, but Generoso Martello has provided some of the commonly
used routines from conio.r and ansi.r as built-in. The following
is a note describing his routines.
Amiga Version
~~~~~~~~~~~~~
AMIGA BREXX EXECUTABLE (03/04/1999) compiled by Generoso Martello
Catanzaro Lido (ITALY)
This is the Amiga executable of BRexx Interpreter. It requires
ixemul.library. I tested Brexx on my old Amiga 68040/25 and it seems
to be 40%-50% faster than the Amiga ARexx. I am planning also to
supply an external library in order to make the BRexx almost 100%
compatible with the Amiga ARexx. Unfortunately the use of 'ADDRESS'
for addressing to an external host (to the ARexx port of Amiga
programs for getting advantage of their commands and functions) can't
be done through an external library, but it has to be done adding the
necessary code to the 'ADDRESS' routines of Brexx source code. Well
I'd like to do that too. For now, enjoy of this really fast and
powerfull rexx interpreter
Future of BREXX:
~~~~~~~~~~~~~~~~
* A REXX compiler REXX to Ansi-C.
* Socket's Functions for network support.
I would be glad to hear any comments and ideas of how this
program can be improved. Questions or Comments about BREXX
should be sent to any of the above addresses.
Y2K
~~~
Normally BRexx is Y2K compliant, but it depends on the
compiler that has been used for the compilation for the interpter
and the user's code. The DATE() function has various options
date()=date(n) -> dd mmm yyyy /* Normalised */
date(s) -> yyyymmdd /* Sorted */
date(e) -> dd/mm/yy /* European */
date(o) -> yy/mm/dd /* Ordered */
date(u) -> mm/dd/yy /* USA */
The user are encouraged to use the Normalised or the Sorted format
in order to ensure consistent functionality of his script for
dates prior and after 2000.
Reviews
~~~~~~~
A review dated Jan-99 from Frank Clarke, REXX Language Association
for this interpreter can be found at the Newletters of the
Rexx language association site at:
http://www.rexxla.org/Newsletter/9901brexx.html
The special features of the REXX interpreter are:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
o All rexx commands and functions have easy and very simple
names.
o Rexx variables are not declared as strings, integers, reals,
or any other kind of variable. All variables are handled
as strings. Only in arithmetic operations must variables
evaluate to a valid number.
ie. ' -2' + 3 will evaluate to '1'
left(21+6,1) will return '2'
left('amo',1) will return 'a'
o There is no need to declare any variable,function before you
use it All variables are evaluate to their name, the first
time they are used.
o There is no any limitation in the size of each variable (or
array) except the convential memory (Only in the 16bit-DOS
version, the maximum allocated memory per variable will be
1 segment 64kb)
o When rexx intrepreter doesn't understand one command it pass
it to the operating system (default) to execute it, or to any
other program you want.
o Rexx has a large library with lot of string handling
functions.
o A very powerful PARSE command, where you can parse a string
(from several sources) according to a template in anything you
like.
This rexx interpreter features also:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
o A mathematic library with all the scientific functions,
sin,cos...
o The ability to create new libraries for rexx programs. (Look
the IMPORT commands)
o Very flexible routines for file I/O
o It has its own stack that make very easy the communication
with the operating system.
o Any program that uses the standard input/output can be used as
rexx function.
ie a = 'cd'() /* returns the current directory, by calling CD
command of DOS */
available to be called from rexx.
What is the reference book for REXX?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The "standard" reference for REXX is Mike Cowlishaw's _The REXX
Language: A Practical Approach To Programming_, currently in its
second edition. (The first edition had "REXX" in blue on the
cover, the second edition has it in red instead.) Mike's book is
often referred to as either "TRL" or "the red book". Until the
ANSI committee releases its standard, TRL is the document that
defines what REXX is. (See the bibliography below for details on
TRL.)
Selected bibliography
~~~~~~~~~~~~~~~~~~~~~
This is from Mike Cowlishaw. Note that a VERY complete
bibliography can be found in _The REXX Handbook_. (Any updates to
the bibliography should be sent to Linda Suskind Green,
[email protected], who will pass them on to the
appropriate persons.)
Modern Programming Using REXX -- Robert P. O'Hara and David
R. Gomberg
In English: ISBN 0-13-597311-2 Prentice-Hall, 1985
ISBN 0-13-579329-5 (Second edition), 1988
The REXX Language -- M. F. Cowlishaw
In English: ISBN 0-13-780735-X Prentice-Hall, 1985
ISBN 0-13-780651-5 (Second edition), 1990
In German: ISBN 3-446-15195-8 Carl Hanser Verlag, 1988
ISBN 0-13-780784-8 P-H International, 1988
In Japanese: ISBN 4-7649-0136-6 Kindai-kagaku-sha, 1988
REXX In the TSO Environment -- Gabriel F. Gargiulo
ISBN 0-89435-354-3, QED Information Systems Inc.,
Order #CC3543; 320 pages, 1990
Practical Usage of REXX -- Anthony S. Rudd
ISBN 0-13-682790-X, Ellis Horwood (Simon & Schuster), 1990
Using ARexx on the Amiga -- Chris Zamara and Nick Sullivan
ISBN 1-55755-114-6, 424pp+diskette, Abacus, 1991
The REXX Handbook -- Edited by Gabe Goldberg and Phil Smith III
ISBN 0-07-023682-8, 672pp, McGraw Hill, 1991
Amiga Programmer's Guide to ARexx -- Eric Giguere
Commodore-Amiga, Inc., 1991
Programming in REXX -- Charles Daney
ISBN 0-07-015305-1, 300pp, McGraw Hill, 1992
Command Language Cookbook for Mainframes, Minicomputers,
and PCs: DOS/OS/2, Batch Language, CLIST, DCL, Perl, REXX
-- Hallett German
Van Nostrand Reinhold, 1992
ISBN 0-442-00801-5, 366 pages, paperback, $49.95
Note that IBM also publishes a whole slew of REXX-related
documents, sometimes referring to REXX as the "SAA Procedures
Language". One of these documents is the SAA CPI Procedures
Language Level 2 Reference, SC24-5549.
Information on ANSI and REXX
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The American National Standards Institute (ANSI) sets national
standards for various things in the United States, including
programming languages. The X3J18 REXX Standards Committee has been
established to defined a formal standard for the REXX language,
using TRL as its base document. The Committee meets 3 or 4 times a
year and holds ongoing discussions throughout the year. Members of
X3J18 mostly include REXX implementors and some users, but anyone
can participate. More information on X3J18 can be had from Brian
Marks (chair), [email protected] or Neil Milsted
(vice-chair), [email protected].
The official web site is http://www.rexxla.org
Newsgroups and mailing lists
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On Usenet the group comp.lang.rexx exists for discussion of
REXX in all its variations. Currently the comp.lang.rexx newsgroup
is also gatewayed with the REXXLIST mailing list (i.e., anything
that gets posted to the newsgroup is sent to everyone on the
mailing list and anything that is sent to the mailing list gets
posted to the newsgroup).
DISCLAIMER
~~~~~~~~~~
THE SOFTWARE REFERENCED IS MADE AVAILABLE AS - IS. THE AUTHOR
MAKES NO WARRANTY ABOUT THE SOFTWARE AND ITS CONFORMITY TO ANY
APPLICATION. THE AUTHOR IS NOT RESPONSIBLE FOR ANY DAMAGE, LOSS OF
DATA, OR LOSS OF MONEY CAUSED BY THIS PROGRAM.