Re: How can i get an env. variable
Posted in 1997
On Wed, 5 Nov 1997, Mark Heeren wrote: } Art S. Kagel wrote: } > Christian Hernoux wrote: } > > I use i4gl ver. 4.11.UC4. How can i get an env. variable ? } > > Does exist a fg??? fonction ? } > } > There is the function fgl_getenv( "ENVVAR" ) but I think that it was } } This works well unless you want to get a special variable like '$$' } the current PID. Anyone have a solution to that? I prefer to not } create a 'c' link Well, $$ (and all the other special variables) are special because there isn't a sensible way to implement them otherwise. In particular, $$ is the value returned from the system call getpid(). I don't think there's a sensible way to get that value apart from calling a C function. The same would apply to other variables such as $PWD. Yours, Jonathan Leffler (johnl@informix.com) #include <witticism.h>