Is if(TRUE) a good idea in C?

后端 未结 17 3471
忘了有多久
忘了有多久 2021-02-19 01:19

In the C programming language, it is my understanding that variables can only be defined at the beginning of a code block, and the variable will have the scope of the block it w

17条回答
  •  渐次进展
    2021-02-19 01:43

    Assuming that you use an old compiler (like I do, it's for old hardware), that you skip the if(TRUE) like others have suggested, and that you have a really HUGE function (witch you should not have in the first place), then I think it's sort of ok. I have done it but it did not feel good...

提交回复
热议问题