=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: winedev: Don' t recommend a preprocessor check to comment out code.

Alexandre Julliard julliard at winehq.org
Tue Sep 3 13:03:34 CDT 2013


Module: docs
Branch: master
Commit: 81555011154280813636d684211e515547f07440
URL:    http://source.winehq.org/git/docs.git/?a=commit;h=81555011154280813636d684211e515547f07440

Author: André Hentschel <nerv at dawncrow.de>
Date:   Tue Sep  3 00:12:20 2013 +0200

winedev: Don't recommend a preprocessor check to comment out code.

---

 en/winedev-coding.sgml |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/en/winedev-coding.sgml b/en/winedev-coding.sgml
index abc7447..dc865b1 100644
--- a/en/winedev-coding.sgml
+++ b/en/winedev-coding.sgml
@@ -100,21 +100,20 @@
         <listitem>
 	  <para>
 	    Commenting out a block of code is usually done by
-	    enclosing it in  <command>#if 0 ... #endif</command>
-            statements. For example.
+	    using <command>if (0)</command>. For example:
 	  </para>
 	  <screen> 
 /* note about reason for commenting block */
-#if 0
+if (0) {
 code
 code /* comments */
 code
-#endif
+}
 	  </screen>
 	  <para>
 	    The reason for using this method is that it does not
 	    require that you edit comments that may be inside the
-	    block of code.
+	    block of code and it makes sure the code gets maintained.
 	  </para>
         </listitem>
         <listitem>




More information about the wine-cvs mailing list