× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



David F and Charles W,

You are right to define the Subprocedures high in the mainline section.

From an OOP style, which has more clarity. The purpose of MAIN is "to
introduce objects to each other"
So your style is correct to abstract the actions and sections into
smaller ones. You are introducing a high level object to other
high-level objects/actions, maybe even to the point of:

LoadSubfile()
GetSubFileChangesFromOptionField()
ProcessNewAddsUsingDetailScreen()
PrintAuditReportUponExit()


I tend to divide my code into subprocedures in a program just to
improve
readability, even when there is very little risk of that subprocedure
being called from anywhere else. Each subprocedure will correspond to
a
specific task executed by the program.
D doThis PR
D doThat PR
/FREE
IF not doThis ( )
RETURN
ENDIF;
IF NOT DoThat ( )
RETURN
ENDIF;

I've discovered that this style seems to annoy at least one programmer

Am I justified in coding in this way or am I wrongly using
subprocedures?

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.