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


  • Subject: RE: MODS in subprocedures
  • From: "Phil" <sublime78ska@xxxxxxxxx>
  • Date: Thu, 10 May 2001 10:52:42 -0400
  • Importance: Normal

Thank you.

-----Original Message-----
From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On
Behalf Of Jon.Paris@hal.it
Sent: Wednesday, May 09, 2001 5:16 PM
To: RPG400-L@midrange.com
Subject: RE: MODS in subprocedures


 >> I just kept my example simple which I shouldn't have done.  Sorry for
the confusion

No problem - normally I'm begging people to just keep it simple!

 >> What I am working on understanding now is the merits between passing
the pointer to the subprocedure versus returning the pointer to the calling
subprocedure.  For that matter, what are the merits of using a return
argument at all?

From my perspective a return value is preferable for two main reasons:
First when the result of the proc is usable directly in a calculation.  In
your case that is not likely.  The second reason is to make it obvious just
_what_ is being changed by the subproc.  Just safer that way - you know you
don't have to chase down the subproc logic just to see if it could have
changed one of the parms.

In your case I think I might go with Hans' suggestion in that having the
storage in the subproc doesn't permit you to invoke the routine twice.
That may not seem important now but one day .....

Even then I might still have it return the whole DS if it is not too huge.
Depends on my mood and the direction of the wind!



+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-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 thread ...

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.