On 06.08.2018 15:08, Rick McGuire wrote:
> I have no plans for doing this.
That is of course fine.

One thing, though. I have not been aware of the possibility in the ooRexx 
ADDRESS keyword statement
to use the empty string "" to indicate the default environment, I simply 
overlooked that piece
information in the rexxref.pdf book (it is also placed at the end of the 
description) for decades!
The first time to become aware of the empty string denoting the default 
environment was studying the
ADDRESS test units in the context of the new ADDRESS...WITH capability of 
ooRexx 5.0beta.

The ooRexx default environment is the command line processor on Windows (CMD) 
and the shell program
(sh) on Unix systems. How about just adding the environment names SYSTEM and 
ENVIRONMENT as
*aliases* for "" (denoting the default environment)?

This would also make the programs better self-documentary when addressing the 
default environment
(SYSTEM or ENVIRONMENT carry a meaning that indicates that the operating system 
gets addressed),
which would be more human centric.

(And it probably would also have the benefit that Regina programs that use the 
default environment
would be executable under ooRexx 5.0 without a need to change the Regina Rexx 
code, making it easier
for Regina users to test and run their programs under ooRexx 5.0.)

---rony



>
> On Mon, Aug 6, 2018 at 8:59 AM Rony G. Flatscher <rony.flatsc...@wu.ac.at
> <mailto:rony.flatsc...@wu.ac.at>> wrote:
>
>     When studying the Regina documentation about "address...with" there are 
> three environments,
>     Regina defines (see link and full text after the signature):
>
>       * "SYSTEM" with aliases "OS2ENVIRONMENT" and "ENVIRONMENT"
>           o standard, uses the operating system command line interpreter, 
> shell
>       * "COMMAND" with aliases "CMD" and "PATH"
>           o does not use command line interpreter, shell, but rather the 
> environment loads the
>             program directly; fully qualified path can be given, otherwise 
> PATH environment
>             variable will be searched
>       * "REXX" alias "REGINA"
>           o creates a new instance of the interpreter to execute a Rexx 
> script.
>
>     Assuming that over time Regina programs that have been using 
> "address...with" are executed
>     with ooRexx, it would be helpful, if the ooRexx implementation would 
> allow such Regina
>     programs to be executed without any changes, if possible.
>
>     Would supporting these Regina "address...with"-environments out of the 
> box (with their
>     aliases) be a feasible solution for the ooRexx implemenation?
>
>     ---rony
>
>     P.S.: Excerpt from Regina 3.9.1 (April 2015) reference (regina391.pdf, 
> one direct link:
>     <ponce.cc/slackware/sources/repo/regina.pdf
>     <http://ponce.cc/slackware/sources/repo/regina.pdf>>), p. 28-29, 
> documenting the above
>     mentioned three environments:
>
>         ... cut ...
>         "Regina uses three kinds of environments. Some have alias names. The 
> environment names are:
>
>         SYSTEM
>             alias OS2ENVIRONMENT
>             alias ENVIRONMENT
>
>         This is the default environment which is selected at startup. The 
> standard operating
>         system command line interpreter will be loaded to execute the 
> commands. You can use the
>         built-in commands of the command line interpreter, often called 
> shell, or any other
>         program which the command line interpreter can find and load.
>
>         COMMAND
>             alias CMD
>             alias PATH
>
>         This environment loads the named program directly. You may supply a 
> path if this is needed
>         for the current operating system to load the program, otherwise 
> Regina uses the standard
>         operating system search rules for programs. This is done by searching 
> through the items of
>         the PATH system-environment variable in most operation systems. You 
> can't use built-in
>         shell functionality like system redirections like you can with 
> SYSTEM. Regina's
>         redirections are more powerful and work in either environment.
>
>         REXX
>             alias REGINA
>
>         This environment uses a new instance of the Regina interpreter 
> program to execute a
>         program. The program has to be a Rexx script. This environment has 
> several advantages. The
>         output of a script can be redirected, the process is independent and 
> a risk of a crash is
>         minimized when playing with external libraries, finally, Regina 
> itself tries to find the
>         correct Rexx interpreter by itself and does everything to create a 
> new incarnation of Regina.
>
>         The definition of Rexx says nothing about which environment is 
> preselected when you invoke
>         the interpreter, although TRL defines that one environment is 
> automatically preselected
>         when starting up a Rexx script. Note that there is no NONE 
> environment in standard Rexx,
>         i.e. an environment that ignores commands, but some interpreters 
> implement the TRACE
>         setting ??? to accomplish this. Regina uses the environment SYSTEM as 
> the preselected
>         environment as mentioned above. More implementation specific details 
> can be found in the
>         section implementation specific documentation for Regina.
>
>         The list of environments will be saved across subroutine calls; so 
> the effect of any
>         ADDRESS clauses in a subroutine will cease upon return from the 
> subroutine."
>         ... cut ...
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to