Re: Accessing program variables across 4gl files in the same executable
Posted in 1998
Well, you can still use globals for that. 4gl now supports multiple globals files. Just split you huge globals into more manageable chunks and have each 4gl module access only the global files it needs. Should you still be using a version of 4gl that does not support multiple globals, try fglpp, my 4gl precompiler, which simulates multiple globals and more. You'll find it in the IIUG software archives at http://www.iiug.org, or in my little site (see sig) HTH, Marco _______________________________________________________________________________ Marco Greco, Catania, Italy marcog@linux.ctonline.it rem radioterapia +39 95 447828 fax 446558 Informix faq http://www.iiug.org/techinfo/faq/informix.htm 4glworks http://www.ctonline.it/~marcog Informix on Linux http://www.ctonline.it/~marcog/ifmxlinux.htm Manish Hemrajani wrote: > > > > >JL: No. They're file static variables in terms of C code. > > >>don't confuse these with globals) > > >JL: I'm not confused, but it appears you are; what you want are global > >variables. > > No I'm not confused I want to avoid using globals cause' of the overheads. > Do u understand? > > >>across 2 or more 4gl > >>programs within the same executable (.4ge file). > > > >JL: I4GL GLOBALS are precisely variables which can be accessed across 2 or > >more I4GL source files within the same executable, which is apparently what > >you want. > > >>Say for example I have one 4gl program containing the "main" and "end > >>main" which in turn calls functions which are declared in another 4gl > >>program. Can these 2 programs access a common set of variables (similiar > >>to "extern" variables in "C") > > > >JL: Yes, but only if they are GLOBALS. Why did you think that GLOBALS are > >not what you want? > > I have an application which has 89 executable files If I start declaring > variables which are gonna be used in just a couple of programs in the > globals file how big do u think my globals file (which as u might already > know is declared in every program ) > All I wanted to know was whether one can declare variables accessible to 2 > programs like C. If the answer is NO I'm fine with that > > -Manish