setenv,'x.x.x.x:0.1' [message #9826] |
Mon, 18 August 1997 00:00  |
Russell Tarver
Messages: 1 Registered: August 1997
|
Junior Member |
|
|
Has anybody run across a problem using setenv,'x.x.x.x:0.1'? I can make it
work for widget applications that don't contain widget_draw.
If they do, I receive multiple xmanager errors and a hard crash of the
current idl session running.
Any info would be appreciated.
Russell Tarver
rtarver@gsbs3.gs.uth.tmc.edu
|
|
|
Re: SETENV [message #49836 is a reply to message #9826] |
Wed, 16 August 2006 13:42  |
Dominic Metzger
Messages: 30 Registered: August 2006
|
Member |
|
|
Hah, of course... somehow, I didnt think of that.
Awesome, thanks to both of you!
dometz
JD Smith wrote:
> On Wed, 16 Aug 2006 10:44:21 -0700, Dominic Metzger wrote:
>
>> Hi,
>>
>> I looked at the specs for the SETENV command in idl and it says "adds
>> or changes an environment string in the process environment."
>> Unfortunately, they only have examples for changing an environment
>> variable but not how to add to an existing env. variable. I tried
>> pretty much everything that seems to work in Unix but I didnt get it to
>> work it in IDL.
>>
>> so, here is what I am trying to do:
>> in Unix:
>> $ setenv FOO "bar"
>> $ echo $FOO
>> bar
>> $ setenv FOO "foo:$FOO"
>> $ echo $FOO
>> foo:bar
>>
>> So, how can you add to an existing env. variable in IDL with the SETENV
>> command?
>
> IDL> setenv,'FOO=bar'
> IDL> setenv,'FOO=foo:'+getenv('FOO')
> IDL> print,getenv('FOO')
> foo:bar
>
> JD
|
|
|
Re: SETENV [message #49838 is a reply to message #9826] |
Wed, 16 August 2006 11:02  |
JD Smith
Messages: 850 Registered: December 1999
|
Senior Member |
|
|
On Wed, 16 Aug 2006 10:44:21 -0700, Dominic Metzger wrote:
> Hi,
>
> I looked at the specs for the SETENV command in idl and it says "adds
> or changes an environment string in the process environment."
> Unfortunately, they only have examples for changing an environment
> variable but not how to add to an existing env. variable. I tried
> pretty much everything that seems to work in Unix but I didnt get it to
> work it in IDL.
>
> so, here is what I am trying to do:
> in Unix:
> $ setenv FOO "bar"
> $ echo $FOO
> bar
> $ setenv FOO "foo:$FOO"
> $ echo $FOO
> foo:bar
>
> So, how can you add to an existing env. variable in IDL with the SETENV
> command?
IDL> setenv,'FOO=bar'
IDL> setenv,'FOO=foo:'+getenv('FOO')
IDL> print,getenv('FOO')
foo:bar
JD
|
|
|
Re: SETENV [message #49839 is a reply to message #9826] |
Wed, 16 August 2006 10:59  |
Foldy Lajos
Messages: 268 Registered: October 2001
|
Senior Member |
|
|
On Wed, 16 Aug 2006, Dominic Metzger wrote:
> Hi,
>
> I looked at the specs for the SETENV command in idl and it says "adds
> or changes an environment string in the process environment."
> Unfortunately, they only have examples for changing an environment
> variable but not how to add to an existing env. variable. I tried
> pretty much everything that seems to work in Unix but I didnt get it to
> work it in IDL.
>
> so, here is what I am trying to do:
> in Unix:
> $ setenv FOO "bar"
> $ echo $FOO
> bar
> $ setenv FOO "foo:$FOO"
> $ echo $FOO
> foo:bar
>
> So, how can you add to an existing env. variable in IDL with the SETENV
> command?
>
> thanks
>
> dometz
use getenv():
IDL> setenv,'foo=bar'
IDL> print, getenv('foo')
bar
IDL> setenv,'foo=foo:'+getenv('foo')
IDL> print, getenv('foo')
foo:bar
regards,
lajos
|
|
|