lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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