|
From everything I've seen, Indicators are Static and Global, if you want to think of them in those terms. Incidentally, Static has nothing to do with whether a variable is local or not. Although most Static variables are local, they are two different definitions, indicators being the perfect example, being static and global. I've always considered Indicators to be contained in a spot in memory for each job, and there is only one indicator memory area for that entire job. So anything that changes an indicator is seen job wide. Global would pretty much describe it. Regards, Jim Langston Me transmitte sursum, Caledoni! Buck Calabro wrote: > > >Indicators are static by definition. > > Don't you mean "global?" > > I always thought that "static" meant that the subprocedure has local storage > for the variable; storage that is untouched by any other parts of the > program and is not re-initialised each time the procedure is called. They > live only in THAT procedure and survive across CALLP boundaries. > > Global variables also survive across CALLP boundaries, but that's because no > subprocedure owns them. Any line of code can manipulate them, subprocedure > or mainline. > > Response indicators (like CF03 03 'Exit') are global and live until the next > READ operation sets them. This doesn't change with subprocedures because > there's no way to define a local version of an indicator. > > Buck +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.