Re: Accessing program variables across 4gl files in the same executable
Posted in 1998
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
> >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