David Ashley wrote: > On Wed, 2013-06-05 at 09:44 -0400, Gil Barmwater wrote: > >>An interesting approach but I think we already have a class that could >>be used for this that has the needed global scope: .environment. Why >>not add the new methods that provide the C arguments to .environment >>instead of creating a new class? > > > Just a bit of history. This is not the first time the subject of adding > availability to the C args has come up. It is not even the second time, > but it is the third time from my memory of the subject. I proposed > adding the C args to the .environment class years ago and was downvoted > to oblivion. Perhaps the winds have changed? > > Adding the C args to the .environment class is certainly a good way to > implement this so I have no objection to it. > > Just so everyone understands the base issue here I will state it. In > windows, the Rexx BIF arg(1) returns an exact duplicate of the command > line arguments. In a *nix environment you may or may not get get an > exact copy of the original command line and for certain you will NOT get > an exact copy if any of the space delimited arguments contain embedded > spaces surrounded by double quotes. This is because Rexx can obtain a > copy of the windows command line from an OS API. In a *nix environment > Rexx has to reconstruct the command line from the passed arguments and > unfortunately it does a really poor job of it. The really unfortunate > thing is that it is much too late to change that implementation as that > would have a terrible impact on existing programs. So we really need a > new and correct implementation to obtain the C args/command line > arguments on *nix platforms. >
Wow! I had no idea *nix platforms had such a problem. Has anything changed in that world to make it "easier" to get the command line from the OS? Or is the way it is "reconstructed" just not optimal? Just one other thought on a possible implementation. Since C uses 0-based arrays and Rexx uses 1-based arrays, I suggest that the method added to .environment NOT be an array (like .argv[]). This would be confusing, prone to errors and difficult to explain. Instead, I would propose just providing a string of the command line (e.g. .commandline) that the user can then examine or parse as needed. > David Ashley > > > ------------------------------------------------------------------------------ > How ServiceNow helps IT people transform IT departments: > 1. A cloud service to automate IT design, transition and operations > 2. Dashboards that offer high-level views of enterprise services > 3. A single system of record for all IT processes > http://p.sf.net/sfu/servicenow-d2d-j > _______________________________________________ > Oorexx-devel mailing list > Oorexx-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/oorexx-devel > > > ----- > No virus found in this message. > Checked by AVG - www.avg.com > Version: 2013.0.3343 / Virus Database: 3184/6383 - Release Date: 06/04/13 > > -- Gil Barmwater ------------------------------------------------------------------------------ How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j _______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel