Re: Local variable acting static in 4GL report
Posted in 1997
This is how it always worked, you do not call a report "call stmt" but you output to report_name() , so you never leave it once you start it. Variables declared in a report section will retain their values. Jacob Salomon <jake@apparel.net> wrote in article <E51HAw.8EH@nonexistent.com>... > Hi folks, > > something strange is interfering with my debugging session. > I'm using all incarnations 4gl release 6.01.UD2 on HP-UX 10.01 > > I have a breakpoint at the entry to a report function, with the command > to print a local (to the report function) record variable named "tv". > The first time, all its members (smallints) are 0, of course. During > the course of the report, the various smallints are bumped up. However, > I expect it to *always* be 0 when I call the report function again. The > variable should be getting allocated on the stack and reinitialized > every time the function is entered. > > However, I am finding that upon entry to the report function the values > are set to whatever they were during the last "after group of" statement > block. > > This violates my understanding of local variables. I wonder if it is > causing a subtle program bug. > > Any ideas out there? > > Thanks. > -- > -- Jake Salomon > . . > _..-'( )`-.._ > ./'. '||\\\\. }\\_/{ .//||` .`\\. > ./'.|'.'||||\\\\|.. )o o( ..|//||||`.`|.`\\. > ./'..|'.|| |||||\\`````` \\'@'/ ''''''/||||| ||.`|..`\\. > ./'.||'.|||| ||||||||||||. | .|||||||||||| ||||.`||.`\\. > /'|||'.|||||| ||||||||||||{ | }|||||||||||| ||||||.`|||`\\ > '.|||'.||||||| ||||||||||||{ | }|||||||||||| |||||||.`|||.` > '.||| ||||||||| |/' ``\\||`` | ''||/'' `\\| ||||||||| |||.` > |/' \\./' `\\./ \\!|\\ /|!/ \\./' `\\./ `\\| > V V V }' `\\ /' `{ V V V > \\ \\ \\ V / / / > +-----------------------------------------------------------+ > | Impeccable Logic: A thought process which successfully | > | resists chicken bites | > +-----------------------------------------------------------+ >