[Groonga-mysql-commit] mroonga/mroonga [master] doc coding-style: add about boolean literal

Back to archive index

null+****@clear***** null+****@clear*****
2012年 3月 15日 (木) 17:57:50 JST


Kouhei Sutou	2012-03-15 17:57:50 +0900 (Thu, 15 Mar 2012)

  New Revision: ba28f72e04f42d0d476e071276d629a02f5c902e

  Log:
    doc coding-style: add about boolean literal

  Modified files:
    doc/source/developer/coding_style.rst

  Modified: doc/source/developer/coding_style.rst (+10 -0)
===================================================================
--- doc/source/developer/coding_style.rst    2012-03-15 17:56:58 +0900 (f88ce55)
+++ doc/source/developer/coding_style.rst    2012-03-15 17:57:50 +0900 (6c2eb5f)
@@ -421,3 +421,13 @@ bool型を用いる
 
     int is_searching;
 
+真偽値のリテラルには ``true`` または ``false`` を用いる
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+よい例:
+
+    bool is_searching = true;
+
+悪い例( ``0`` 以外の値を真の値として用いている):
+
+    bool is_searching = 1;




Groonga-mysql-commit メーリングリストの案内
Back to archive index