× 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 thought that if a parameter was passed by reference, because the
address was in the main module's pointer space, that you couldn't get
a pointer to it from a called module.  Where did I get that idea?
This will make things much more efficient.  Thanks!

You can get a pointer to a reference parameter, but you're right, that pointer will point to data that's in the called module. (I don't know if that matters to you.)


The reason you can't get a pointer to a CONST field is that the pointer would allow you to change the data. The compiler makes sure you can't change data that's defined as CONST, so it blocks your ability to get a pointer to it.

In C it's possible to define a CONST pointer, which allows you to get a pointer to data, but doesn't allow you to change the data... RPG doesn't have anything like that (yet)


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.