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



Thanks for illuminating this for me Jon.

I now see what Lim Hock-Chai was getting at: he substituted MyLookup for %lookup and it compiled. He wondered why %lookup didn't compile in a similar manner.

You pointed out that specifying CONST on MyLookup's second parameter, made that parameter not updatable, and therefore, made an expression for that parameter acceptable to the compiler.

The compiler, apparently in order to make sure that %lookup will have compatible data to work with at run time, only allows arrays defined at compile time to be used by name only.

Mel Rothman
Mel Rothman, Inc.



Jon Paris wrote:
 >> This works because myLookup always returns 1 AND there is no %lookup
with an expression in the array name parameter.

You forced me to look again Mel - it appears to work because of the const
keyword on the proto for MyLookup.

getArray is a function that returns an array and yet is acceptable as a parm
to MyLookup.  If you remove the const keyword it will not compile.


Jon Paris
Partner400

www.Partner400.com
www.RPGWorld.com




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.