Sean Allen said the following on 01/14/2009 12:20 PM:
On Jan 14, 2009, at 11:45 AM, Mehul N. Sanghvi wrote:
I would like to be able to get at all of the environment variables
(whether it is the shell environment variables or the CGI environment
variables or something else). What object/class would I use for that ?
o wait, i think i know this:
Smalltalk getenv: 'foo'
Smalltalk getenv: 'bar'
Is there something that will get all the environment variables and store it in
an Array or something like that ? Using the approach above, say in a CGI
environment when I'm trying to debug, I just want it to print every environment
variable as I probably do not know what I would be looking for but am hoping
that something in the environment will give me some guidance.
Did that make sense ?
Perl, Tcl, and PHP store the environment variables in an associative array
which can then be poked and peeked at (yes the usage of the two words was
intentional use of BASIC). Scheme also supports this with a recent enhancement
to the language, SRFI-98.
Is there some way to do something similar ? Maybe there is a message
"getenvAll" ? I couldn't find it and there doesn't seem to be much
documentation for getenv on smalltalk.gnu.org site.
cheers,
mehul
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk