in reply to C style comments?

What is wrong with:
#!/usr/local/bin/perl -w # my $foo; #=================================# # This piece of code performs the # # bar transformation according to # # the algorithm in Chapter 8 of # # Knuth. # #=================================# sub bar { local $something = shift; # warning - tricky bit of code here # fixed on 9 Aug 2000 by KR to avoid # possible divide by 0 situation return 1; } # and so on
That is the convention we use here, with most languages. Make the comments stand out, and be generous with them.

Ken

Replies are listed 'Best First'.
RE(2): C style comments?
by Cirollo (Friar) on Aug 09, 2000 at 17:26 UTC
    Sorry, I didn't make my intentions totally clear here: What I really wanted was a way to comment out a large block of code that I wanted to cut out for some reason - a lot of the time, I would find myself using an emacs macro to do it, but typing something like C-x ( C-n C-a # C-x ) C-u 50 C-e just to comment out a block of code is not too fun. Then I want to put it back in and have to go throught the whole thing again.

    I agree that the "lots o #'s" form is good for regular comments (read: information about the program), but slapping a few "=cut"s around code has been useful several times, just in the past day.