Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watcgl.UUCP Path: utzoo!watmath!watcgl!jchapman From: jchapman@watcgl.UUCP (john chapman) Newsgroups: net.micro.pc Subject: Re: set environment Message-ID: <1460@watcgl.UUCP> Date: Wed, 13-Mar-85 09:37:27 EST Article-I.D.: watcgl.1460 Posted: Wed Mar 13 09:37:27 1985 Date-Received: Thu, 14-Mar-85 03:02:36 EST References: <1200005@ur-univax.UUCP> Organization: U of Waterloo, Ontario Lines: 23 > The DOS manual talks about adding things to the environment with the SET > ENVIRONMENT command and goes on to say that things in the environment can be > accessed from within an application. Can anyone tell me how to do this or > where it is documented ? > > Mark J. Dumic > ...!{allegra|decvax|seismo}rochester!ur-univax!marc This works the same way is in unix, e.g. set = (I can't recall off hand if the = is necessary or just a blank but you get the idea. Accessing the environment is a different matter: when a program is executed part of the run time header (in first 100h bytes of programs code segment) is set to the address of the environment. The environment is stored as a series of strings x=y. So you would need some sort of routine to pick up the pointer and scn through the environment looking for the string of interest (I think they are all null terminated). Hope this is what you were looking for, John Chapman ...!watmath!watcgl!jchapman