RPG IV Comment Blocks
December 8, 2004 Hey, Ted
Conditional compilation directives (/IF DEFINED) have two good uses that I have not seen mentioned in any of the midrange-oriented e-mail newsletters. Maybe you would like to tell your readers who work in RPG shops about them.
One good way to use a conditional compilation directive is to comment-out large sections of source code. Here’s an example.
/if defined(TheFollowingIsCommentedOut) C eval *in21 = *on C eval *in22 = *off C* eval *in23 = *on C if *in24 C exsr DoSomething C exsr DoSomethingElse C endif /endif
I prefer this technique to that of commenting out each line individually. For one