If you have a one-line if statement:
if(<condition>)
execute();you should still surround
execute();with braces:
if(<condition>)
{
execute();
}Now, if you go back and add a second instruction
if(<condition>)
{
execute();
execute2();
}you don't have to worry about putting in the braces, and you know that you won't forget to put them in.
Author : Webmaster
0 nhận xét:
Post a Comment