comment out multiple lines at once 
Author Message
 comment out multiple lines at once

How can I comment out several lines of code with one (or two) tags like
/*  
...
...
  */

in Java ?

Or do I really have to prepend "#" to every line ?

Regards
Gerd



Mon, 29 Nov 2004 15:25:32 GMT  
 comment out multiple lines at once

Quote:

> How can I comment out several lines of code with one (or two) tags like
> /*  
> ...
> ...
>   */

> in Java ?

> Or do I really have to prepend "#" to every line ?

yes

--



'u!`onuids!Qdsm!i`bjds')#my email-address is reversed!   http://fruiture.de



Mon, 29 Nov 2004 15:29:58 GMT  
 comment out multiple lines at once

Quote:
>> On Thu, 13 Jun 2002 16:25:32 +0200,

> How can I comment out several lines of code with one (or
> two) tags like /* ...  ...  */
> in Java ?
> Or do I really have to prepend "#" to every line ?

Have a look at "perldoc perlpod"

hth
t



Mon, 29 Nov 2004 15:41:39 GMT  
 comment out multiple lines at once



Quote:
> How can I comment out several lines of code with one (or two) tags like
> /*
> ...
> ...
>   */

> in Java ?

try acme::comment ;-D
Quote:

> Or do I really have to prepend "#" to every line ?

> Regards
> Gerd



Mon, 29 Nov 2004 15:58:26 GMT  
 comment out multiple lines at once

Quote:

> How can I comment out several lines of code

Please do not rehash Frequently Asked Questions.

They have already been answered. Just go find the answer.

You are expected to check the Perl FAQ *before* posting to the
Perl newsgroup you know.

   perldoc -q comment

      "How can I comment out a large block of perl code?"

Quote:
> Or do I really have to prepend "#" to every line ?

I like that solution better than the FAQ answer though.

"commented out" blocks should *look like* they are commented out.

Adding a character to the beginning of a range of lines
should be a no-brainer with any capable programmer's editor.

--
    Tad McClellan                          SGML consulting

    Fort Worth, Texas



Mon, 29 Nov 2004 16:19:28 GMT  
 comment out multiple lines at once


Wed, 18 Jun 1902 01:00:00 GMT  
 comment out multiple lines at once

Quote:
> How can I comment out several lines of code with one (or two) tags [...]
> Or do I really have to prepend "#" to every line ?

Many editors will allow you to select a range of lines and
comment/uncomment them, so prepending '#' to every line is no big deal.
If yours doesn't, you can use embedded pod to cause the parser to ignore
sections of code:

my $x = 5;

=pod
$x++;
=cut

print $x; # 5

And by the way, this is a Frequently Asked Question.

perlfaq7: "How can I comment out a large block of perl code?"

Next time, please check the FAQ *before* posting to the newsgroup. Thank
you.

-mjc



Mon, 29 Nov 2004 16:33:22 GMT  
 comment out multiple lines at once


Wed, 18 Jun 1902 01:00:00 GMT  
 comment out multiple lines at once

Quote:


> > How can I comment out several lines of code with one (or two) tags like

[snip]

Quote:
> > Or do I really have to prepend "#" to every line ?
> yes

no, you don't.  see the FAQ that Tad mentioned.

--

The Perl Review - a new magazine devoted to Perl
<http://www.theperlreview.com>



Mon, 29 Nov 2004 18:48:01 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. comment multiple lines

2. multiple line comments?

3. Comment out multiple lines

4. Comment removal line by line.

5. Multiple dbmopen()'s at once (perl4)

6. How to do multiple files at once?

7. How to upload multiple graphic files at once ?

8. How to upload multiple graphic files at once ?

9. Retrieving multiple hash elements at once

10. Possible Bug: Multiple DBM Files at once

11. undef()-fing multiple items at once

12. Regex Multiple occurances of a pattern in multiple lines

 

 
Powered by phpBB® Forum Software