|
In that case, would I still gain efficiency by changing >From this: D VT100FormatScreenData... D pr 80 dim(24) D piRecvData 32766 varying To This?: D VT100FormatScreenData... D pr D piRecvData 32766 varying D piScreen 80 dim(24) options(*nopass) If the program uses the piScreen param to pass value back, it would still have to copy the data from the global screen variable in the procedure to the piScreen field. That is no different from using the return value where it has to copy data to the variable in the caller. Is there? - Note: I like to create procedure that return the value of what it does. It makes the caller program a bit more readable. However, I also understand that it makes the procedure become not as flexible since a procedure can only return one value. -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement Sent: Friday, March 17, 2006 6:05 PM Does a return value return a pointer to a static variable? No. It copies the entire contents of the variable from the subprocedure to it's caller. That's why it's inefficient, and why I wouldn't do things that way.
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.