[SDL] Problems with SDL and Slackware 8.1

niklas bolander niklas at bolander.as
Wed Jul 31 21:11:01 PDT 2002

On Mon, Jul 22, 2002 at 10:26:33PM +0200, Torsten Giebl wrote:
> I know this is OFFTOPIC but what means #if 0 ??? I asked it here, because it might be interesting for
> other Coders too.

It's an #if statement which will never be true.  (0 is false :^) )

So it's an easy way of doing something like this:


    a whole
    bunch of code
    you wish to
    comment out


Except it's not affected by any existing comments.  e.g.:


    this could cause    /* foo-bar-baz */
    a syntax error      /* <-- this is no longer commented-out! */

  */                    /* <-- this is a syntax error! */

So you just go:

  #ifdef 0

    stuff you
    want commented out      /* comments won't affect it */
    go here


Silly, but it works.


More information about the SDL mailing list