|
We have made use of import/export declarations to share data across > modules instead of having to pass it
-----Original Message-----
Chris Holko
Sent: Tuesday, July 08, 2014 10:03 AM
We have made use of import/export declarations to share data across
modules instead of having to pass it
Sent from my iPhone
On Jul 8, 2014, at 9:57 AM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>wrote:
that are used everywhere. An alternative is to pass them as parameters to
If I may expand on this - I think that global variables are useful for things
every procedure - this can get a bit cumbersome - so one makes one's
choice.
effects - that once set, they are pretty static. Or at least very carefully
The challenge with globals as I see it is to be sure that there are no side
managed - that has always been a challenge with subroutines.
perhaps should be done using parameters and local variables and maybe a
Now for a utility procedure - with a specific purpose - everything could and
return value.
wrote:
JMHO
Vern
On 7/8/2014 8:48 AM, Henrik Rützou wrote:
Buck
this is very easy - take middleware service programs as CGIDEV2,
HTTPAPI or powerEXT. They all have a lot of subprocedures that shares
global variables within the service program and general storage
allocations otherwise they could not run.
On Tue, Jul 8, 2014 at 3:22 PM, Buck Calabro <kc2hiz@xxxxxxxxx>
--
On 7/8/2014 4:46 AM, D*B wrote:Hi Dieter,
Additinal note:
global data and coupling procedures by global data is not bad design!
Bad design is to define data global, which is needed only local!!!
This surprises me, which means I probably do not understand what you
mean. Could you please give an example of good design that couples
subprocedures with global variables?
--buck
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(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.
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(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.
This is the RPG programming on the IBM i (AS/400 and iSeries) (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.