26.04.2012, 22:23
(
Последний раз редактировалось Falco-Ger; 28.04.2012 в 10:09.
)
when you dont put brackets after an if, that if will only affect the next line
command 2 will allways be executed
if u make use of this, please use tabs accordingly
anyway i suggest to allways put brackets, even if there is only one command after the if, because it's confusing and it can cause problems when you want to add something to it and you dont remember to put the brackets after that.
especialy if your compiler outputs shows you 300 warnings about "loosing identication" allready
Код:
if (a == 1)
command1;
command2;
if u make use of this, please use tabs accordingly
anyway i suggest to allways put brackets, even if there is only one command after the if, because it's confusing and it can cause problems when you want to add something to it and you dont remember to put the brackets after that.
especialy if your compiler outputs shows you 300 warnings about "loosing identication" allready

