When do you use code blocks?

后端 未结 4 1873
名媛妹妹
名媛妹妹 2020-12-21 03:08

When do you use code blocks in C/C++/C#, etc.? I know the theoretical reason behind them, but when do you use them in real programs?

EDIT: I have ju

4条回答
  •  盖世英雄少女心
    2020-12-21 03:15

    In addition to the obvious ("when required by syntax", like in a switch or a try catch finally),
    Whenever you need to treat a block of 2 or more statements as an atomic unit

提交回复
热议问题