diff: c_coding_standard.html

Fergus Henderson fjh at cs.mu.oz.au
Mon Jul 28 23:11:54 AEST 1997


www/developer/c_coding_standard.html:
	Add new layout guideline: for if-then-elses whose condition does
	not fit on one line, put the open-curly on a line of its own.

Index: c_coding_standard.html
===================================================================
RCS file: /home/staff/zs/imp/www/developer/c_coding_standard.html,v
retrieving revision 1.5
diff -u -r1.5 c_coding_standard.html
--- c_coding_standard.html	1997/04/22 01:25:58	1.5
+++ c_coding_standard.html	1997/07/25 05:58:17
@@ -332,7 +332,8 @@
 
 	if (this_is_a_somewhat_long_conditional_test(
 			in_the_condition_of_an +
-			if_then)) {
+			if_then))
+	{
 		/*...*/
 	}
 		
@@ -364,6 +365,18 @@
 } else {
 	/* ... */
 } /* end if */
+
+/*
+** if the condition is so long that the open curly doesn't 
+** fit on the same line as the `if', put it on a line of
+** its own
+*/
+if (a_very_long_condition() &&
+	another_long_condition_that_forces_a_line_wrap())
+{
+	/* ... */
+}
+
 </pre>
 <font color="#000000">
 
-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list