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

No. C has naked block. Where do you think Perl got it? {grin}

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^4: If Statement
by Aristotle (Chancellor) on Nov 06, 2002 at 19:57 UTC
    Oh wow. I had no idea - never seen one in a C source.

    Makeshifts last the longest.

      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); }