say value('ProgramFiles(x86)',,'ENVIRONMENT')
gives me
C:\Program Files (x86)
I dare not use the second argument
Walter
Von: Erich Steinböck [mailto:erich.steinbo...@gmail.com]
Gesendet: Freitag, 05. September 2014 14:21
An: Open Object Rexx Developer Mailing List
Betreff: Re: [Oorexx-devel] Problem with VALUE()-BIF
Rony, maybe there's a typo in your code.
say value('ProgramFiles(x86)',,'ENVIRONMENT')
works perfectly to retrieve the contents of the Windows environment variable
"ProgramFiles(x86)"
On Fri, Sep 5, 2014 at 1:35 PM, Rony G. Flatscher <rony.flatsc...@wu.ac.at
<mailto:rony.flatsc...@wu.ac.at> > wrote:
The VALUE()-BIF can be used to fetch and set environment variables in the
operating system's process. To do so, the second argument must be set to
"ENVIRONMENT" to direct the VALUE()-BIF to the process' environment.
Newer Windows operating systems may have an environment variable named
ProgramFiles(x86)
The VALUE()-BIF unfortunately is not able to process this environment value.
Rather it comes up with a runtime error:
10 *-* prog_files86=value("ProgramFiles(x86)",sel)
Error 40 running F:\test\rmBSF4ooRexx\4wp.rex line 10: Incorrect call to
routine
Error 40.26: VALUE argument 1 must be a valid symbol; found "ProgramFiles(x86)"
Obviously, the current implementation expects the first argument to be a valid
Rexx symbol, which is not the case due to the parenthesis.
Can this be regarded to be an error, as one cannot expect operating system
environment variables to adhere to the rules of Rexx symbols? With other words,
shall I open a bug or a RFE?
---rony
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net <mailto:Oorexx-devel@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/oorexx-devel
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel