in reply to •Re: Re^2: If Statement
in thread If Statement

Oh wow. I had no idea - never seen one in a C source.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^4: If Statement
by Baz (Friar) on Dec 30, 2003 at 19:50 UTC
    naked blocks can be useful in C, because they allow you to declare variables somewhere in a function other than at the start, for example -
    void MyFunction() { int a = 10; printf ("%d",a); { int b = 5; printf ("%d",b); } }

    The following would be illegal in C -
    void MyFunction() { int a = 10; printf ("%d",a); int b = 5; printf ("%d",b); }