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



You guys have all some workarounds for this. But the question should be:


Why is a function like this which is used in the daily work of a System
i developer not implemented in RDi?

Java has a nice "Toggle Comment" feature where a line or a block gets
commented out. Why is there no equal functionality in RDi. I even did
this in the RPG Next Gen Editor so why couldn't IBM/Rational do it in
RDi?

Just my 2 cents.

Mihael

-----Original Message-----
From: wdsci-l-bounces@xxxxxxxxxxxx [mailto:wdsci-l-bounces@xxxxxxxxxxxx]
On Behalf Of Voris, John
Sent: Friday, July 24, 2009 9:17 PM
To: wdsci-l@xxxxxxxxxxxx
Subject: [WDSCI-L] Block Commenting in LPEX

Commenting out a block of code? You could use the @rdocc function I
showed yesterday in RPG-L list.
http://archive.midrange.com/rpg400-l/200907/msg00366.html
I throw it out here since it may be useful to someone with a similar
need sometime.

I put a sample of my @rdocj and @docc in the other list yesterday. I
realized that it could be used in this case, too. To summarize, I have
@rdocj() which puts comments out to the joblog using QMHSNDPM.
It's sister function is only a "commenter", nothing to the joblog, but
is useful if you want to define a block of code as being grouped
together using an If or Dou for an indent, without moving the bypassed
code into a separate subroutine or subprocedure.

I see a disadvantage using /IF and /ENDIF .... These complier commands
do not like comments after their /IF DEFINED( SKIP )
And if there are any "C" Calc lines with fields defined inside the
block, those fields have to be defined elsewhere.
Creating an "If" to get around the code block is a suitable substitute.
Especially when debugging in development.
And I can build a self-documenting If using my @rdocc() function. (Not
efficient in the machine as /IF, but . . .

The @rdocc allows 4 lines of text and always returns True. It attaches
that literal-text to the structure of the code-block being bypassed. So
the @rdocc function is for documenting/commenting anything really
important - like program flow changes that might be temporary.

You separate the code block by using Dou or If using @rdocc() knowing
that @rdocc always returns True.

So instead of
/IF DEFINED( SKIP )

You could have

If not @rdocc('We are commenting out this section' :
'just for now, because the business will not be providing discounts'
:
'for the next 3 months' : ' per request # OE 12345' ) ;


It is just another way to stop a block of code from running.
And it is more elegant than If 1<>1 .... Where you ask yourself, did
someone make a typo here?


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.