What type of c source do you prefer?
-
There are two c types, one is: if(...) { ... } else { ... } the other is: if(...){ ... ... }else{ ... ... } Witch one do you prefer? And why?
Hi guys. I'm a very man. Do you like fat men?
-
There are two c types, one is: if(...) { ... } else { ... } the other is: if(...){ ... ... }else{ ... ... } Witch one do you prefer? And why?
Hi guys. I'm a very man. Do you like fat men?
Both the ways. It's just upto you what you feel better to work with. IMO the first option offers more readabilty and indentation for your code is also very clear. So I prefer to go with the first option.
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
There are two c types, one is: if(...) { ... } else { ... } the other is: if(...){ ... ... }else{ ... ... } Witch one do you prefer? And why?
Hi guys. I'm a very man. Do you like fat men?
The first one! Easier on the eyes.
-
There are two c types, one is: if(...) { ... } else { ... } the other is: if(...){ ... ... }else{ ... ... } Witch one do you prefer? And why?
Hi guys. I'm a very man. Do you like fat men?
I've never seen variation 2, although I see a lot of if { } else{ } Either way, my vote is for 1.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog
-
There are two c types, one is: if(...) { ... } else { ... } the other is: if(...){ ... ... }else{ ... ... } Witch one do you prefer? And why?
Hi guys. I'm a very man. Do you like fat men?
I prefer the first; it's easier to identify scope with brackets that line up. It also puts some white space between the
if
(or other leading statements) and code inside the scope. (I also tend to put a blank line before theif
.)Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke