|
-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Dennis Lovelady
Envoyé : mardi 26 janvier 2010 14:28
À : 'RPG programming on the IBM i / System i'
Objet : RE: Correct use of STATIC variables
I think the point of STATIC variables is, you DON'T initialize themcontext, such
between program calls. At least, not according to this description
from the RPG Reference on static variables. I mean, how do you
initialize something that is not visible outside of its
as a procedure?
Upon occasion I will have a procedure that needs to know if
it needs to be "reset." Maybe it's accumulating some total
for groups of data or ...
For example, if one parameter is a flag that is passed to
indicate "First call from this entity" (whatever that entity
may be). When the procedure sees that flag is set, it can do
its re-initialization.
Is this what the OP had in mind?
Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"If only God would give me some clear sign! Like making a
large deposit in my name at a Swiss bank."
-- Woody Allen
--
This is the RPG programming on the IBM i / System i
(RPG400-L) mailing list To post a message email:
RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change
list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.