|
-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Haas,
Matt (CL Tech Sv)
Envoyé : vendredi 9 octobre 2009 14:44
À : RPG programming on the IBM i / System i
Objet : RE: program design problem
What problem is the boss trying to solve? Just because
someone doesn't like how something was done is rarely a good
reason to make a change.
Matt
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of David FOXWELL
Sent: Friday, October 09, 2009 3:57 AM
To: RPG programming on the IBM i / System i
Subject: program design problem
Hi all,
I'd like some expert opinion here!
PgmA calls pgmB via a router with 2 obligatory parameters.
The first, to tell the router what to do the second, an error
message. :
Caller
Callp router( Info_Callee : ErrorMsg )
In addition, input parameters and/or output parameters can be
passed via pointers :
Callp router( Info_Callee : ErrorMsg : ptr_in ) Callp router(
Info_Callee : ErrorMsg : *omit : ptr_out ) Callp router(
Info_Callee : ErrorMsg : ptr_in : ptr_out )
So there are 4 types of call possible.
The router will call the callee one of four ways like this,
depending on the parameters received :
Callp callee ( ErrorMsg )
Callp callee ( ptr_in : ErrorMsg )
Callp callee ( ptr_out : ErrorMsg )
Callp callee ( ptr_in : ptr_out : ErrorMsg )
The callee does not control the passing of optional
parameters, or the value *omit. This is done by the router.
The boss does not like it, and wants this :
Callp router( ptr_in : ptr_out )
The obligatory parameters would just be addressed by the
pointers. No optional parameters. All programs call the
router and are called with 2 pointers.
What do you think?
--
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-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.