brsy
nah mang
- May 12, 2011
- 1,530
- 272
Programming styles commonly deal with the visual appearance of source code, with the goal of requiring less human cognitive effort to extract information about the program. Software has long been available that formats source code automatically, leaving coders to concentrate on naming, logic, and higher techniques. As a practical point, using a computer to format source code saves time, and it is possible to then enforce company-wide standards without debates. Indent styles assist in identifying control flow and blocks of code. In some programming languages indentation is used to delimit logical blocks of code; correct indentation in these cases is more than a matter of style. In other languages indentation and white space do not affect function, although logical and consistent indentation makes code more readable. Compare:
or
* Credits to Wikipedia for this tutorial:
PHP:
if (hours < 24 && minutes < 60 && seconds < 60) {
return true;
} else {
return false;
}
PHP:
if (hours < 24 && minutes < 60 && seconds < 60)
{
return true;
}
else
{
return false;
}
You must be registered for see links