× 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.



-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Alan Campin

I am not clear on what you mean by a main procedure. You do a
have a main procedure. If you are saying you miss writing
monolith programs, can't agree with you there. I hate
monolith programs.

I mean that if I have MAIN(myprocedure) then myprocedure is the main procedure. Without the MAIN keyword in the main procedure, the parameters are global. I don't (at least I think) do monoliths, either, so I have a lot of internal procedures which are basically just cutting up the code into sections.

So in the main procedure I'll have something like :

P myprocedure B
d PI
D ClientID const like(dfq)

If initializedOK;
DoStuff ( ClientID );

EndIF

P myprocedure E


Using MAIN means I now have to define and pass ClientID to all the internal procedures whereas without MAIN, all the procedures can access ClientID. Some of the procedures are just receiving clientID so they can pass it to another subprocedure. It would seem to me that as the function of the program is to treat one client and one client only, then it would be normal that this was a global variable.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.