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



Joe,

I don't need you to teach me RPG. Thanks. I expressed my opinion about how I'd like to see VARYING done in the future, because it would make my life easier.

Please stop wasting my time by dragging this thread out forever.

I don't see how listing "VARYING4" (or VARYING(4) or VARYING(*MAX4GB)) "adds overhead for everybody".

(I knew I should've just gone quiet the moment Joe Pluta got involved in this thread. Always a mistake to get into any sort of a discussion with him.)


Joe Pluta wrote:

What you say you want is to be able to pass a VARYING field by reference to
another procedure. You want the second procedure to be able to determine
the length of the field by looking at the bytes preceding the varying field.
The reason you need to do this is so that the procedure in another
compilation unit can determine the length of the passed data. As you point
out, the BIFs that work with the VARYING field are designed to work within
the current compilation unit.
I can see a couple of ways around this without resorting to an explicit
index size, but by far the easiest is for you to pass two parameters to your
procedures, just like we used to in the olden days. Pass the address of the
buffer and the length. You have access to both in the calling procedure.

And if you absolutely require the ability to pass a single parameter, then
write one proxy procedure for each size of VARYING field. Then have the
proxy pass the address and length to the actual procedure. I know it's not
exactly what you want and it adds a second prototype (or even a third, if
you ever required gigabyte fields), but I think it's better than imposing
extra overhead on everybody for I would hope you agree is a relatively rare
requirement.

Joe




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.