Hi Guys,
Could someone show me a good example of how to
indent code..
Thanks alot
Boontune
Hi Guys,
Could someone show me a good example of how to
indent code..
Thanks alot
Boontune
Code:{ { { { } } } }
I am against the teaching of evolution in schools. I am also against widespread
literacy and the refrigeration of food.
umm... tabbing within each level within loops is a good start.
EntropySink. You know you have to click it.
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).
FAQ
"The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.
"If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.