|
-----Original Message----- From: Scott Johnson <sjohnson@highsmith.com> Newsgroups: comp.sys.ibm.as400.misc To: Midrange List <MIDRANGE-L@midrange.com> Date: Thursday, January 20, 2000 6:19 PM Subject: Subprocedure questions > >Do you use subroutines within a subprocedure??? I have on procedures that were more akin to a program in size and complexity and required many processes to complete it's purpose, like "RebalanceReserves" or "LoadWorkRecords" involving dozens of workfiles. This has always been in a service program where it also used many local procedures (no exports) as well as subroutines. The subroutines seemed more comfortable where global variables needed to be manipulated or used and passing parms seemed awkward. The vast majority of my procedures are quite small (less than one screen) and the need just doesn't come up. >Do you think it is a good idea to mix subroutines into a >nomain module??? As they say, use the right tool for the job. There's no hard and fast rules. But small is beautiful, less is more, etc, etc. >I am looking for some general opinions. We had somebody >inhouse write a bunch of procedures that in turn contained >subroutines. I found them difficult to follow. If they >had been subprocedures instead I think the code would have been >a lot easier to read. They are more difficult to follow....just as difficult as a program with many subroutines. Clean simple procs are much simpler to read. Whether they are simpler to follow is another question. As I said, I don't use subroutines often, maybe 10-12 times out of 300 or so "public" procedures. >-- THANKS >------------------------------------------------------ >Scott P. Johnson >Microcomputer Development Specialist >IBM Certified Specialist - AS/400 RPG Programmer >Highsmith Inc. >W5527 Hwy 106, PO BOX 800 >Fort Atkinson, WI 53538-0800 >TEL: 920-563-9571 FAX: 920-563-7395 >sjohnson@highsmith.com >www.highsmith.com >------------------------------------------------------ >+--- >| This is the Midrange System Mailing List! >| To submit a new message, send your mail to MIDRANGE-L@midrange.com. >| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. >| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. >| Questions should be directed to the list owner/operator: david@midrange.com >+--- > +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.