Re: setenv?

From: Joachim Schimpf <j.schimpf_at_icparc.ic.ac.uk>
Date: Fri 07 Jan 2005 06:58:57 PM GMT
Message-ID: <41DEDBF1.4010508@icparc.ic.ac.uk>
Joost Geurts wrote:
> Hi,
> 
> Is there a way to set an environment variable in ECLiPSe? I found
> getenv/2 but missed setenv/2.

There is an undocumented setenv/1 which you can use to define setenv/2:

setenv(N, V) :-
	concat_string([N,"=",V], S),
	sepia_kernel:setenv(S).

If I remember correctly, the reason it is not an official builtin was
that it was not supported on some platforms, but nowadays it seems to
work everywhere, so I guess we should add the setenv/2 builtin on the
next occasion.


-- 
  Joachim Schimpf              /             phone: +44 20 7594 8187
  IC-Parc                     /      mailto:J.Schimpf@imperial.ac.uk
  Imperial College London    /    http://www.icparc.ic.ac.uk/eclipse
Received on Fri Jan 07 19:01:18 2005

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:07:32 PM GMT GMT