|
If I need the internal procedure array to be static, would I still get better performance by passing the array in as param? See below: P VT100FormatScreenData... P B export D pi 80 dim(24) D piRecvData 32766 varying D myCurrAttr s 1 static D myScreen s 1920 static D myScreenAttr s 1920 static D prScreenAry s 80 dim(24) based(prScreenAryPtr) D prScreen s 1920 C . . . . . Do stuff . . . * below is how it return the array C eval prScreen = myScreen C eval prScreenAryPtr = %addr(myScreen) C return prScreenAry P VT100FormatScreenData... P E -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Klement OTOH, the performance of returning 1920 bytes as a return value is abysmal. It'd be a much better idea to pass the array by reference than to return it as a return value -- it'll perform much better, and you'll be able to use options(*omit) or options(*nopass) to make the parameter optional without running into the "omitted array index" problem.
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.