[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A little comment randomness
- From: Jonathan Castello <twisolar@...>
- Date: Fri, 19 Feb 2010 10:22:16 -0800
Aww, but that's not as fun! ;)
~Jonathan
On Fri, Feb 19, 2010 at 6:43 AM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> wrote:
>> *laughs* In case you're curious, the original C++ comment abuse looked
>> like this:
>>
>> /*/
>> std::cout << "One" << std::endl;
>> /*/
>> std::cout << "Two" << std::endl;
>> //*/
>>
>> You just change the first /*/ to /**/ to toggle, and the second /*/ to
>> // to disable both. I actually believed I couldn't do this in Lua,
>> until I read that multi-line comments also supported [=[ ]=] syntax!
>
> I'd rather use
>
> #if 0
> std::cout << "One" << std::endl;
> #else
> std::cout << "Two" << std::endl;
> #endif
>
> and toggle 0 to 1. It seems much clearer to me.
>