|
GA, 1) The type checking 2) PLISTs aren't nearly as flexible. The PLIST in one program will probably not match the PLIST in another program even if they are both calling the same program. The programmers style, or the business problem at hand, may use different variable names in the program. However a /copy of the prototype doesn't care what the variable names are in the program. The only problem I have with EXTPGM's is that I so much want to change them into one big subprocedure in a Module of a Service Program. (Not that this is a bad thing.) I just like the return variables you can get with a subprocedure MyVar = MyPgm(Parm1:Parm2); while a straight EXTPGM requires MyPgm(Parm1:Parm2:MyVar); Granted, the prototypes and procedure interfaces are documenting but the inline code is my preference. Rob Berendt -- "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." Benjamin Franklin G Armour <garmour400r@xxxxxxxxx> Sent by: rpg400-l-bounces@xxxxxxxxxxxx 10/24/2003 10:20 AM Please respond to RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> To RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx> cc Subject Re: Benefits of Sub-procedures --- Barbara Morris <bmorris@xxxxxxxxxx> wrote: > Andy Holmer wrote: > > Barbara, > > > > Please correct me if I misunderstand this... > > > > > I can always prototype the program call incorrectly. The compiler will > > ensure that I call the way that I have prototyped, but not necessarily > > the way the *Entry PLIST was defined. I do not get that kind of > > checking unless I use Sub-Procedures and a /COPY book to check the > > prototype against the interface as I compile the module. > > Andy, you can write your program to /copy in the prototype and use a > procedure interface instead of the *ENTRY PLIST. Then you get the same > parameter checking as with procedures. <After blank gaze passes> This love affair with /copy baffles me. But if this is an advantage for prototypes, why not just /COPY the parameters for the *ENTRY & CALL PLISTs? If you do that, what advantage do prototypes have over *ENTRY? Not picking a fight, just really curious. Honest. GA __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com _______________________________________________ This is the RPG programming on the AS400 / 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.