[Gambas-devel] Application.Env[] working
Rob
sourceforge-raindog2 at ...19...
Sat Nov 22 23:43:38 CET 2003
On Saturday 22 November 2003 17:35, Benoit Minisini wrote:
> I have just done the same thing... I didn't make the Count
> property, because it is useless, but I can do more:
> Application.Env["PATH"] = ...
I was too chicken to wrap setenv, yeah. But the Count isn't
entirely useless.... I don't know if gambas can be made to take
different types for the same argument, like
Application.Env["PATH"] uses getenv() and gives you the contents
of PATH, e.g. /bin:/usr/bin:...
Application.Env[27] gives you name of the 28th environment
variable, e.g. SHELL
but if it can, and if I get my act together and write the code to
handle it, you could do this:
For i = 0 to Application.Env.Count
name = Application.Env[i]
print name & "=" & Application.Env[name] & "\n"
Next
...to iterate over Env[] I'm not sure there's a valid reason to
want to do this, but I know I have done so when debugging CGI
scripts ;)
Rob
More information about the Devel
mailing list