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



Common use of varying(4) looks to be a performance problem. Currently
you code a common procedure to accept the largest varying input like
so:
d NextCommaSeperatedValue...
d pi 2000a varying
d InOutIx 10i 0
d InCsvString 32000a const varying options(*varsize)

callers of this procedure that pass varying strings only pass a
reference to the varying, no matter the size of the varying being
passed:
d csvString s 2000a varying
d ix s 10i 0
d csvValue s 256a varying
/free
csvString = "abc,efg,rpg,xyx" ;
ix = 0 ;
csvValue = NextCommaSeperatedValue( ix: csvString ) ;

when you change your common procedure to accept large varying, I dont
think the pass by reference will still apply to varying(2) callers. My
guess is the compiler has to copy from the 2 byte header varying(2) to
the 4 bytes header varying(4).

Large value types, in general, are a performance problem, no? Esp for
programmers who understandably want to code the obvious, like a = b,
not concerning themselves with the fact that a and b might be 16 meg
super tanker variables.

Java and C# have the advantage on this front. They both deal with
objects and references to objects. a = b means set a to refer to the
same object that b refers to. The continued integration of RPG into
the JVM ... now that would be progress.

-Steve

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.