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



On 2012/9/25 1:49 AM, Vernon Hamberg wrote:

Help me out here - I've always thought leaving *INLR *OFF means that on
another call to the program, variables will have the values they had
when the program ended before. Is this different with the MAIN keyword -
remember, we don't compile to 7.1 (blushing!).


Vern, you're right about how *INLR works for what's now called a cycle-main module. (And was formerly just not called a NOMAIN module.)

With the MAIN keyword, you have something very similar to a NOMAIN module, but the MAIN keyword indicates which of your subprocedures will be the program-entry procedure. The main procedure is called a linear-main procedure (running from beginning to end) rather than a cycle-main procedure (running the RPG cycle).

Cycle-main:
/free
dsply 'hello';
return;

Linear-main:
H main(mypgm)
P mypgm b
/free
dsply 'hello';
// return opcode not needed
/end-free
P e

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.