|
-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Alan Campin
Envoyé : mardi 13 octobre 2009 19:18
À : RPG programming on the IBM i / System i
Objet : Re: Procedure to set global variable
Yes, create two procedures. My rule is always can you describe what a
function(procedure) does without the use of a conjunctive
verb (And, Or). If you can't, then something is wrong.
On Tue, Oct 13, 2009 at 7:52 AM, Kurt Anderson
<kurt.anderson@xxxxxxxxxxxxxx
wrote:
You could have separate Set... and Get... procedures thatare wrappers
for this special procedure of yours to make it easy on thecalling program.
Although I'm not particularly fond of fusing what Ibelieve to be two
completely procedures into one (i.e. a SetGet... procedure).procedure a SetGet
-Kurt
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of David FOXWELL
Sent: Tuesday, October 13, 2009 2:19 AM
To: RPG programming on the IBM i / System i
Subject: RE: Procedure to set global variable
-----Message d'origine-----
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Ken Sims
But another way is to make the SetTransactionCode
also returned.procedure. Make the transaction code parameter *NOPASS. Add a
return value for the transaction code.
When passed a transaction code, that value is saved and
variable local to
When not passed a transaction code, the saved value is returned.
Then the transaction code can be saved in a STATIC
program codethe SetGet procedure.
I've tried this out and I rather like it.
But how would you name this procedure?
If I do SetTransactionCode then GetTransActionCode, the
is self-documenting. SetGetTransActionCode needscommenting. I called
it InzTransActionCode.(RPG400-L) mailing
--
This is the RPG programming on the IBM i / System i
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,please take a
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting,
moment to review the archives athttp://archive.midrange.com/rpg400-l.
(RPG400-L) mailing
--
This is the RPG programming on the IBM i / System i
list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe,please take a
unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx Before posting,
moment to review the archives athttp://archive.midrange.com/rpg400-l.
--
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.