I don't write new Subroutines, subprocedures are sufficient and 1
construct less is good for readability.
IMHO for beginners using ILE concepts subroutines might still be helpful for
encapsulating and structuring the encapsulated source code.
But as soon as they have learned to think really modular, they'll find out
subroutines are not needed (except may be in a few special situations)
At least it's my experience. When we started with ILE concepts, I thought
without subroutines I'll end up in a clunky, nasty and unreadable code, but
now ... I can't remember when I've written the last subroutine.
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von D*B
Gesendet: Tuesday, 08.7 2014 21:06
An: RPG programming on the IBM i / System i
Betreff: Re: Are subroutines codependent?
<Nathan>
Be more precise about describing the scope of variables.
</Nathan>
local vars := defined inside a procedure global vars := defined in the so
called global declarations of a module you can widen the scope of vars by
keyword export in global definitions ( I don't use this and I recommend not
to use it!°!!) you could limit the scope to bind by copy by binder language
(I don't use
both)
I don't see any need to change existing programms by replacing subroutines
by subprocedures.
I don't write new Subroutines, subprocedures are sufficient and 1 construct
less is good for readability.
D*B
--
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.