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



GKern@xxxxxxxxxxxxxxxx wrote:

Now a really cool thing is that if you don't reference a field in the program, and try to debug the program and try to display a non-referenced variable, even though it is in the record read, that variable isn't available to the debugger. That's because the compiler is smart enough to know that an unreferenced variable isn't used and therefore shouldn't waste memory. (How's that for preemptive garbage collection/prevention!)


That's true of the OPM RPG compiler, but not of the ILE RPG compiler. (Except starting in V6R1 it _can_ be true if you specify OPTION(*NOUNREF).

Before V6R1, and by default even in V6R1, unreferenced variables are generated into the program. You can evaluate them in the debugger, but their values will never change from blank/zero because the ILE RPG compiler does do the optimization where it doesn't load the unreferenced fields on an input operation. (That can be very confusing; I can't guess if it's more or less confusing than when the debugger says the variable doesn't exist.)


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.