3 ms·
I tend to follow these guidelines with the following exceptions: 1. always use curly braces 2. 4 spaces instead of a tab character
by 2bluesc 9y ago
I tend to follow these guidelines with the following exceptions:
1. always use curly braces
2. 4 spaces instead of a tab character
- wvenable 9y agoI violate #1 in only one case, the entire statement has to be one line: if (var1 != var2) return false; But having it on two lines and tabbed out without braces seems extremely ugly and dangerous to me.
- luckydude 9y ago100% agree with both points. Though I'm the crazy guy who does #define unless (x) if (!(x)) so I can do unless (f = popen("ps -axf")) die("popen of ps -axf");
- BenjiWiebe 9y agoI use a tab character with vim tabstop and shiftwidth set to 4.