Thread: Float Function Issues

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    One is not supposed to use braces
    Code:
     { }
    inside one's case statements.

  2. #2
    Registered User
    Join Date
    Apr 2006
    Posts
    2,149
    Quote Originally Posted by abachler View Post
    One is not supposed to use braces
    Code:
     { }
    inside one's case statements.
    Why not? It's helps organize the code. They are optional, but they don't hurt.

    Braces can be put anywhere in a function body to separate out a section of code. This has the other effect that all local variables declared within the block are destroyed at the end of the block. If there are no local variables, then the braces serve only as a visual que.
    It is too clear and so it is hard to see.
    A dunce once searched for fire with a lighted lantern.
    Had he known what fire was,
    He could have cooked his rice much sooner.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 05-13-2011, 08:28 AM
  2. dllimport function not allowed
    By steve1_rm in forum C++ Programming
    Replies: 5
    Last Post: 03-11-2008, 03:33 AM
  3. Replies: 28
    Last Post: 07-16-2006, 11:35 PM
  4. Could somebody please help me with this C program
    By brett73 in forum C Programming
    Replies: 6
    Last Post: 11-25-2004, 02:19 AM
  5. Possible Loss of data
    By silicon in forum C Programming
    Replies: 3
    Last Post: 03-24-2004, 12:25 PM