Home Segments Index Top Previous Next

165: Mainline

Many C programmers use braces in every if statement they write, even though the braces often surround just one statement. Such programmers argue that the habitual use of braces reduces errors later on when a program is modified. When braces are not used, it is easy to add a second embedded statement to an if statement, yet to forget that the modification requires the addition of braces.