Subject: Re: environment variables
From: (Rob Warnock)
Date: 18 May 2001 10:36:38 GMT
Newsgroups: comp.lang.scheme
Message-ID: <9e2tvm$7envt$>
Andrew Lambert  <> 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")


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

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