comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » setenv,'x.x.x.x:0.1'
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: SETENV [message #49839 is a reply to message #9826] Wed, 16 August 2006 10:59 Go to previous message
Foldy Lajos is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: SETENV
Next Topic: IDL Reads Excel 2003 Spreedsheet Data

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 09:20:39 PDT 2025

Total time taken to generate the page: 1.68267 seconds