dragon slayer2
Member
so after reading lots of forums and books. I learned Curly brackets is a option. But most programmers say use curly brackets because this can prevent bugs or errors in code also make it easy to read for other programmers. So after a week reading about it I say its best choice to always use curly brackets don't matter how small the code is
example
now this can lead into a bug or error.
If I coded it like this
now I have less of a chance to cause a bug or error and I just made it clearer for the next programmer to read.
Any thoughts or comments on this post or something I missed please reply.
example
Code:
if(ds is awesome)
return;
now this can lead into a bug or error.
If I coded it like this
Code:
if(ds is awesome)
{
return;
}
now I have less of a chance to cause a bug or error and I just made it clearer for the next programmer to read.
Any thoughts or comments on this post or something I missed please reply.