Subject: Re: environment variables
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 18 May 2001 10:36:38 GMT
Newsgroups: comp.lang.scheme
Message-ID: <9e2tvm$7envt$1@fido.engr.sgi.com>
Andrew Lambert  <adl@jennic.com> wrote:
+---------------
| Does anyone know of a way to pick up environment variables set in C
| shell (e.g. setenv /home/test) in scheme scripts?
+---------------

Since it's not part of IEEE or R5RS Scheme, there's no standard way,
however, most implementations have a built-in "getenv" primitive
(possibly named something else):

	> (list (getenv "USER") (getenv "HOME"))
	("rpw3" "/u/rpw3")
	> 


-Rob

p.s.
You might read Draft SRFI-22 <URL:http://srfi.schemers.org/srfi-22/>
"Running Scheme Scripts on Unix" (including the reviewer comments)
for some somewhat-related information.

-----
Rob Warnock, 31-2-510		rpw3@sgi.com
SGI Network Engineering		<URL:http://reality.sgi.com/rpw3/>
1600 Amphitheatre Pkwy.		Phone: 650-933-1673
Mountain View, CA  94043	PP-ASEL-IA