Xref: utzoo comp.binaries.ibm.pc.d:3816 comp.sys.ibm.pc:31782 Path: utzoo!attcan!utgpu!watmath!iuvax!bobmon From: bobmon@iuvax.cs.indiana.edu (RAMontante) Newsgroups: comp.binaries.ibm.pc.d,comp.sys.ibm.pc Subject: Re: Environment variables and TurboC Message-ID: <23513@iuvax.cs.indiana.edu> Date: 19 Jul 89 14:04:04 GMT References: <3510@uokmax.UUCP> <1989Jul19.131626.14807@sun.soe.clarkson.edu> Reply-To: bobmon@iuvax.cs.indiana.edu (RAMontante) Organization: malkaryotic Lines: 12 One way is to use the oft-overlooked third argument to main: int main(int argc, char **argv, char **env) { return 0; /* ...or whatever... */ } env is an array containing all the environment variables. I recently posted a little utility called `printenv' which uses this to display any or all environment variables' values. See pp. 17-19, 24 in the TCv2.0 Reference Manual.