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



Follow up on my suggestion: You'd also want to select the text to do this
with and check the "Restrict search to selection" box.

Rick Weber  |  TOYS 'Я' US International 


-----Original Message-----
From: Weber, Richard [mailto:Weberr@xxxxxxxxxxx] 
Sent: Tuesday, October 17, 2006 10:55 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: RE: Commenting out blocks of code in FF

I've never tried this but I've always had it in the back of my mind in case
I needed it (Along with a bunch of other useless knowledge!) 

If the columns you want to put the '//' into contain spaces you could check
the "Restrict search to columns" box on the Find/Replace control box and
replace all '  ' found in those 2 columns with '//' or some other variation
on that idea.

Rick Weber  |  TOYS 'Я' US International 

-----Original Message-----
From: AGlauser@xxxxxxxxxxxx [mailto:AGlauser@xxxxxxxxxxxx] 
Sent: Tuesday, October 17, 2006 10:43 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Commenting out blocks of code in FF

Hi Brian

Brian wrote on 17/10/2006 10:30:57 AM:

Is there a way to comment out large blocks of code in free format?  We
tried /* */ and it didn't work and putting // in front of each statement
would suck since there's a whack of lines we'd like to omit.

AFAIK, there is no block commenting mechanism in the RPG language (aside 
from the compiler directive magic you mentioned).
 

The only other way I have seen it done is by a "/if
defined(TheFollowingIsCommentedOut) and /Endif" statements.  Is there
another way to do it?

As usual, there is :)  The way I would do it is to use WDSC.  Record a 
macro (there is a 'Start recording' button on the top toolbar).  The macro 
would be something along the lines of 

1. Insert '//'.
2.  Hit the down arrow
3.  Hit Home.
4.  Hit Right arrow until you get to column 7.

Then just play the macro over and over.  There might even be a way to 
repeat it n times using the LPEX command line.

Another option if you are assured blank spaces in the first two code 
columns would be to use the 'overlay with selection function'.  You 
comment a small block, then 'rectangle select' the comments, then below 
the highlighted block right click and choose 'Selected->Overlay'.  Then, 
you can rectangle select the new block (now doubled in size) and repeat. 
This is actually quicker than it sounds if you use shortcut keys (Alt+R to 
select and Alt+Z to overlay) because your block size gets pretty large 
pretty quickly.

HTH,
Adam

############################################################################
#########
Attention:
The above message and/or attachment(s) is private and confidential and is
intended 
only for the people for which it is addressed. If you are not named in the
address 
fields, ignore the contents and delete all the material. Thank you. Have a
nice day.

For more information on email virus scanning, security and content
management, please contact administrator@xxxxxxxxxxxx
############################################################################
#########

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.