There are use cases where one wishes to address different environments with commands where the desired target environment is stored in a variable.

Something like:

   address var cmd

where some variable VAR may resolves to a string with the possible values "A", "B", "SYSTEM", "C" and some variable CMD resolves to a string that gets sent to the environment referred to by VAR.

Currently it seems that one either has to verbatimely denote the environment, 
e.g.

   address A commandForA
   ... address environment and command change
   address SYSTEM CMD
   ... address environment and command change
   addrexx XYZ CMD
   ...

or use "address value" and use the command:

   address value (VAR)
   CMD
   ... address environment and command change
   address value (VAR)
   CMD
   ...

What may be desirable in the case many different environment handlers exist 
would be a solution like:

   addresss (VAR) CMD
   ... address enviornment and command change
   address (VAR) CMD
   ...

This would mean to allow the environment to be denoted in additiony by an expression in parentheses (this would follow e.g. the pattern found in the FORWARD keyword statement).

The documentation would need to be changed from "To send a single command to a specified environment, code an environment, a literal string or a single symbol, which is taken to be a constant, ..." to "To send a single command to a specified environment, code an environment, a literal string, a single symbol, which is taken to be a constant, /or an expression in parentheses/, ..." .

Would that be an acceptable RFE for the ADDRESS keyword instruction?

The reason/motivation for this is a real world application of deploying multiple environment handlers in a single Rexx program and sending commands to the different environment handlers (the result of one command handler should be immediately processed by another command handler, maybe edited by the program in between).

---rony
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to