3 Aug 2009 08:11
Re: Block Commenting in LPEX
At last ... someone also seeing the obvious. Thanx. Mihael -----Original Message----- From: wdsci-l-bounces@... [mailto:wdsci-l-bounces@...] On Behalf Of praveen gunda Sent: Friday, July 31, 2009 6:57 PM To: Websphere Development Studio Client for iSeries Subject: Re: [WDSCI-L] Block Commenting in LPEX I agree. I used WDSC & Eclipse for Java projects about 6 yrs back and even back then there were standard shortcuts for commenting in Java. Not sure why this is not implemented in RDi.. Sounds so ridiculous on IBM's part to miss out even after so many version releases. Praveen On Tue, Jul 28, 2009 at 2:11 AM, Schmidt, Mihael <Mihael.Schmidt@... > wrote: > 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@... [mailto:wdsci-l-bounces@...] > On Behalf Of Voris, John > Sent: Friday, July 24, 2009 9:17 PM > To: wdsci-l@... > Subject: [WDSCI-L] Block Commenting in LPEX > > Commenting out a block of code? You could use the <at> 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 <at> rdocj and <at> docc in the other list yesterday. I > realized that it could be used in this case, too. To summarize, I have > <at> 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 <at> rdocc() function. (Not > efficient in the machine as /IF, but . . . > > The <at> 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 <at> 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 <at> rdocc() knowing > that <at> rdocc always returns True. > > So instead of > /IF DEFINED( SKIP ) > > You could have > > If not <at> 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@... > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/wdsci-l > or email: WDSCI-L-request@... > 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@... > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/mailman/listinfo/wdsci-l > or email: WDSCI-L-request@... > 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@... To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/wdsci-l or email: WDSCI-L-request@... 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@... To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/wdsci-l or email: WDSCI-L-request@... Before posting, please take a moment to review the archives at http://archive.midrange.com/wdsci-l.
RSS Feed