Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2004:
[Freeciv-Dev] (PR#10238) CodingStyle: put operators at the beginning of
Home

[Freeciv-Dev] (PR#10238) CodingStyle: put operators at the beginning of

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#10238) CodingStyle: put operators at the beginning of a line
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 21 Sep 2004 09:25:22 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=10238 >

I had thought this was standard.  Surely we all agreed on it?  But 
Mateusz points out it's not in CodingStyle.

jason

Index: doc/CodingStyle
===================================================================
RCS file: /home/freeciv/CVS/freeciv/doc/CodingStyle,v
retrieving revision 1.9
diff -u -r1.9 CodingStyle
--- doc/CodingStyle     20 Sep 2003 19:32:26 -0000      1.9
+++ doc/CodingStyle     21 Sep 2004 16:24:36 -0000
@@ -34,6 +34,15 @@
 
 - An empty line should be placed between two separate blocks of code.
 
+- Place operators at the beginning of a line, not at the end.  It should be
+    if ((a
+         && b)
+        || c) {
+  instead of
+    if ((a &&
+         b) ||
+        c) {
+
 ================================
  Comments
 ================================

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#10238) CodingStyle: put operators at the beginning of a line, Jason Short <=