As I'm building Rexx "applets", I'm creating reusable
portions of code that would do wonderfully if they
could be INCLUDEd in each Rexx app, substituted every
time the app was run. The most obvious choice to me is
to insert a preprocessor #INCLUDE directive, and have
Regina Rexx automatically invoke a preprocessor. After
some online searching, there does not appear to be a
preprocessor option, so at this point all I can think
of to do is "wrap" each Regina Rexx invocation in a
batch file that invokes a preprocessor, saves the
preprocessed output as a temp file, runs it, then
deletes it. This causes PARSE SOURCE problems in
getting the original appname/location, and while I can
do some theatrics in the batch file to handle this
(saving old file, renaming temp file as old file,
restoring old file), there could be other issues I
haven't thought of yet...
Is there a better way to do this? My thoughts thus far:
1. Does/should Regina Rexx automatically invoke a
preprocessor like C compilers do? I note that, in
version 3.3, Regina ignores #INCLUDE directives, yet
does NOT give an error message (as opposed to, for
example, #IFDEF and #DEFINE).
2. Is there some way to use "macros"? I see much about
them in the docs, but I confess I'm not sure what the
word means in a Rexx context or how to actually set it up.
3. I also see a lot about pulling functions from DLL
libraries, but have been unable to find anything in the
docs or Google searches as to how to BUILD one of these
libraries. At any rate, I want code snippets to be
inserted, not be limited to entire functions, so this
may not be as useful...
4. Anything other ideas?
Your thoughts and assitance appreciated!