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



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

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.