www.digitalmars.com         C & C++   DMDScript  

D - getenv

reply "Matthew Wilson" <dmd synesis.com.au> writes:
Firstly, apologies for what may be a sequence of dumb questions, as I've not
been working with D since the middle of last year.

My question is, how do I access the C-function getenv? I've tried "import
c.stdlib" but that does nothing. Is there an already established preferred
alternative.

Thanks

Matthew
Mar 12 2003
parent "Walter" <walter digitalmars.com> writes:
"Matthew Wilson" <dmd synesis.com.au> wrote in message
news:b4p4ef$31bl$1 digitaldaemon.com...
 My question is, how do I access the C-function getenv? I've tried "import
 c.stdlib" but that does nothing. Is there an already established preferred
 alternative.
extern (C) char* getenv(char*); should do it.
Mar 13 2003