Commenting Out Commented Code

Marcus Hall thoth at tellab2.UUCP
Wed Oct 17 03:18:24 AEST 1984


>>The best and most widely accepted way to prevent a block of code from
>>being compiled while still leaving the code in the file is as follows:
>>
>>#ifdef notdef
>
>But what if notdef is defined?  Clearly, you want
>
>#ifdef  notdef
>#ifndef notdef
>	code code code code /* but I don't like code! */ wonderfull code
>#endif
>#endif
>
>This will always work! :-)

Slightly simpler is:
#if 0
	code code code code /* but I don't like code! */ wonderfull code
#endif

marcus hall
..!ihnp4!tellab1!tellab2!thoth
-- 
marcus hall
..!ihnp4!tellab1!tellab2!thoth



More information about the Comp.lang.c mailing list