Re: Commenting C++ code - TIPS
From: bartek (spam.will.eat.itself_at_o2.pl)
Date: 05/06/04
- Next message: Old Wolf: "Re: g++ errors out Pass by Reference function call in C++ --- Please HELP"
- Previous message: Bob Bell: "Re: USL v.s. STL"
- In reply to: John Harrison: "Re: Commenting C++ code - TIPS"
- Next in thread: Old Wolf: "Re: Commenting C++ code - TIPS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 6 May 2004 21:35:50 +0000 (UTC)
"John Harrison" <john_andronicus@hotmail.com> wrote in
news:2fvk5aF2s0alU1@uni-berlin.de:
>
> "bartek" <spam.will.eat.itself@o2.pl> wrote in message
> news:Xns94E1DA57D4976bartekdqwertyuiopo2p@153.19.251.200...
>> "John Harrison" <john_andronicus@hotmail.com> wrote in
>> news:2fumrpF2ijfgU1@uni-berlin.de:
>>
>> (...)
>>
>> > Using an IDE that has syntax colouring you would immediately see
>> > which block was commented out. I've never seen an IDE that can
>> > colour #if #else #endif blocks though.
>>
>> FYI, gvim does it. Maybe it's not an IDE in
>> full-blown-sense-of-the-word, though, but a bloody useful code editor
>> nonetheless.
>>
>
> Does it colour the block depending on whether it will be compiled or
> not?
>
> #if 0
> // one colour
> #endif
>
> #if 1
> // another colour
> #endif
>
> That's what struck me as useful about rajeshb's tip.
Certainly. Gvim's C/C++ syntax colour definition treats #if 0 ... #endif
block just like it was a comment.
-- :: bartekd [at] o2 [dot] pl
- Next message: Old Wolf: "Re: g++ errors out Pass by Reference function call in C++ --- Please HELP"
- Previous message: Bob Bell: "Re: USL v.s. STL"
- In reply to: John Harrison: "Re: Commenting C++ code - TIPS"
- Next in thread: Old Wolf: "Re: Commenting C++ code - TIPS"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]