|
wrote:
You guys have all some workarounds for this. But the question shouldbe:
System
Why is a function like this which is used in the daily work of a
i developer not implemented in RDi?[mailto:wdsci-l-bounces@xxxxxxxxxxxx]
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
On Behalf Of Voris, Johnsubstitute.
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
Especially when debugging in development.(Not
And I can build a self-documenting If using my @rdocc() function.
efficient in the machine as /IF, but . . .attaches
The @rdocc allows 4 lines of text and always returns True. It
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?
--
This is the Websphere Development Studio Client for iSeries (WDSCI-L)
mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/wdsci-l.
--
This is the Websphere Development Studio Client for iSeries (WDSCI-L)
mailing list
To post a message email: WDSCI-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/wdsci-l
or email: WDSCI-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/wdsci-l.
As an Amazon Associate we earn from qualifying purchases.
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.