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



I am confused. I thought that was exactly what VALUE meant.

VALUE means pass a copy of the actual data (as opposed to a pointer which is
what happens with CONST). So it works well for small parms but is
problematic for large ones.

CONST does not mean I guarantee this value will not be changed. Just
that I will try.

I would use the term "that is my intent" rather than "try" but that's
semantics. The caller's view and the callee's view are different. CONST
for the caller means "I don't want him to change it" - from the callee's
perspective he gets a pointer (which may or may not be to the original
field) and if there is no PI/PR (matching the caller's PR) present, there's
nothing to stop him from changing the data.

To the best of my knowledge there is nothing "special" about the pointer
that prevents you copying/modifying the address or pretty much anything else
if the parm is not CONST protected. I suspect that what Bob is thinking
about is that there are restrictions placed by the compiler on the use/abuse
of the pointer _if_ there is a CONST proto definition for the parm. This
includes not being able to pass the parm on to other programs/procedures
that do not include CONST on the parm definition. But these are RPG
restrictions not the system.

Jon Paris
Partner400

www.Partner400.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.