Nutster Posted March 2, 2004 Posted March 2, 2004 Jon said: David mocks me when I say that I have to do this to read his and C code. I'm completely code blind unless something is perfectly indented at tab size 2/4. If I can't see the obvious block structure from the other side of the room then it's just gibberish.I use a consistant style. It just is not the same style Jon happens to use. Mine: if (a<0) { cmd1(); cmd2(); } else if (a>0) { cmd3(); cmd4(); } else { cmd1(); cmd4(); } switch (c) { case 1: cmd5(); case 2: cmd6(); break; default: cmd7(); } Jon's: if (a<0) { cmd1(); cmd2(); } else { if (a>0) { cmd3(); cmd4(); } else { cmd1(); cmd4(); } } switch(c) { case 1: cmd5(); cmd6(); break; case 2: cmd6(); break; default: cmd7(); } Just a few differences. David NuttallNuttall Computer Consulting An Aquarius born during the Age of Aquarius AutoIt allows me to re-invent the wheel so much faster. I'm off to write a wizard, a wonderful wizard of odd...
Administrators Jon Posted March 2, 2004 Administrators Posted March 2, 2004 Nutster said: I use a consistant style. It just is not the same style Jon happens to use. I think yours is the more "proper c programmer" style from what I've seen. I hardly ever see code indented my newbie way Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now