Re[2]: Local variable acting static in 4GL report
Posted in 1997
Neil Gall wrote: >I seem to recall that I-4GL's report functions do not behave like true >functions in terms of privacy of locally declared variables. Perhaps >you could try a global tv variable instead, with something like: > >function report_driver() >... > foreach processed_row > ... > let tv = 0 > output to report your_rpt(your_row.*) >... > end foreach > ... >end function >To my knowledge, global variables behave as they should in report >functions. Sorry I couldn't tell you why though. I have a feeling that global variables *may* not always do what you expect within report blocks. If the report is ordered internally, the values of the global variables, when read within the report block, may not be in step with the program? -- Peter Neilson peter_neilson@lendlease.com.au