Hi Guys,
Could someone show me a good example of how to
indent code..
Thanks alot
Boontune
Printable View
Hi Guys,
Could someone show me a good example of how to
indent code..
Thanks alot
Boontune
Code:{
{
{
{
}
}
}
}
umm... tabbing within each level within loops is a good start.
First of all, if you are part of a professional team of programmers or are taking a programming class, go by whatever standard your boss/teacher sets. If you just need to indent for your own sake, and no one else will see your code, do whatever you have to do. There is disagreement in the programming community over some indenting. For example,
No one can really tell you which way is better. I've seen some good arguments to support both sides. If you have the freedom, do what feels right to you.Code:// some people do this
function(int x)
{
// code goes here
}
// others do this
function(int x){
// code goes here
}
But, in general, indent everything in a loop, a function(including main), and a conditional statement(like if or switch).