Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Block Comments Or Rest-Of-Line Comments? Date: Thu, 21 Mar 2024 12:23:58 -0700 Organization: None to speak of Lines: 22 Message-ID: <87msqr1j8x.fsf@nosuchdomain.example.com> References: MIME-Version: 1.0 Content-Type: text/plain Injection-Info: dont-email.me; posting-host="0bf58c5e3e50115de10475b5e7b86fc1"; logging-data="2510880"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18xwZxBIiIc2lQ+9brnF2H3" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:3qIV9sQTk6DEWs2NYCmqdgTNAbo= sha1:lPJGw+Pj4eKvMKCMsqDMuPE/QRU= Bytes: 1629 Richard Harnden writes: [...] > And sometimes, when it's not a really a comment, but rather a block of > code I don't want right now: > > #ifdef 0 > ... > #endif I think you mean "#if 0". I use that sometimes, but one disadvantage is that if you're viewing the middle of a very large block of code, it can be hard to tell that it's been "commented" out. I have a script that applies "#if 0" and "#endif" to a block of code *and* prepends "* " to each line in the block. -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Medtronic void Void(void) { Void(); } /* The recursive call of the void */