{"id":900,"date":"2012-10-12T11:16:15","date_gmt":"2012-10-12T03:16:15","guid":{"rendered":"http:\/\/www.poloo.org\/?p=900"},"modified":"2012-10-12T12:05:35","modified_gmt":"2012-10-12T04:05:35","slug":"%e8%bd%ac%e8%bd%bd10%e7%a7%8d%e4%bb%a3%e7%a0%81%e9%a3%8e%e6%a0%bc","status":"publish","type":"post","link":"https:\/\/www.poloo.org\/?p=900","title":{"rendered":"\u8f6c\u8f7d10\u79cd\u4ee3\u7801\u98ce\u683c"},"content":{"rendered":"<pre class=\"brush:php\">\/\/1.  Ansi\/Allman\/Bsd\u98ce\u683c\uff08\u683c\u5f0f\u7f29\u8fdb\u4ece\u4e0b\u4e00\u884c\u5f00\u59cb\u62ec\u53f7\uff09\r\n int Foo(bool isBar)\r\n {\r\n     if (isBar)\r\n     {\r\n         bar();\r\n         return 1;\r\n     }\r\n     else\r\n         return 0;\r\n }\r\n \/\/2.  Java\u98ce\u683c\uff08\u683c\u5f0f\u7f29\u8fdb\u76f4\u63a5\u7d27\u63a5\u540e\u9762\u62ec\u53f7\uff09\r\n int Foo(bool isBar) {\r\n if (isBar) {\r\n bar();\r\n     return 1;\r\n } else\r\n     return 0;\r\n }<\/pre>\n<p><!--more--><\/p>\n<pre class=\"brush:php\"> \/\/3.  Kernighan_Ritchie\u98ce\u683c\uff08\u683c\u5f0f\u7f29\u8fdb\u4f7f\u7528Linux \u65b9\u5f0f\u62ec\u53f7\uff09\r\n int Foo(bool isBar)\r\n {\r\n if (isBar) {\r\n bar();\r\n return 1;\r\n } else\r\n     return 0;\r\n }\r\n \/\/4.  Stroustrup\u98ce\u683c\uff08\u683c\u5f0f\u7f29\u8fdb\u4f7f\u7528stroustrup \u65b9\u5f0f\u62ec\u53f7\uff0c\u7f29\u8fdb\u4f7f\u75285 \u4e2a\u7a7a\u683c\uff09\r\n int Foo(bool isBar)\r\n {\r\n if (isBar) {\r\n bar();\r\n return 1;\r\n } else\r\n     return 0;\r\n }\r\n \/\/5.  Whitesmith\u98ce\u683c\uff08\u683c\u5f0f\u7f29\u8fdb\u4f7f\u7528\u4e0b\u4e00\u884c\u4e14\u7f29\u8fdb\u7684\u62ec\u53f7\uff09\r\n int Foo(bool isBar)\r\n {\r\n if (isBar)\r\n {\r\n bar();\r\n return 1;\r\n }\r\n else\r\n     return 0;\r\n }   \r\n\r\n \/\/6.  Banner \u98ce\u683c\uff08\u683c\u5f0f\u7f29\u8fdb\u4f7f\u7528\u76f4\u63a5\u7d27\u63a5\u548c\u7f29\u8fdb\u7684\u62ec\u53f7\uff09\r\n int Foo(bool isBar) {\r\n if (isBar) {\r\n bar();\r\n return 1;\r\n }\r\n     else\r\n         return 0;\r\n }\r\n \/\/7.  GNU \u98ce\u683c\uff08\u683c\u5f0f\u7f29\u8fdb\u4f7f\u7528\u4e0b\u4e00\u884c\u62ec\u53f7\uff0c\u8bed\u53e5\u5757\u62ec\u53f7\u7f29\u8fdb\u4e24\u4e2a\u7a7a\u683c\uff09\r\n int Foo(bool isBar)\r\n {\r\n if (isBar)\r\n {\r\n bar();\r\n return 1;\r\n }\r\n else\r\n     return 0;\r\n }\r\n \/\/8.  Linux \u98ce\u683c\uff08\u683c\u5f0f\u7f29\u8fdb\u4f7f\u7528  Linux \u65b9\u5f0f\u62ec\u53f7\uff0c\u8bed\u53e5\u5757\u91cc\u9762\u7f29\u8fdb8 \u4e2a\u7a7a\u683c\uff09\r\n int Foo(bool isBar)\r\n {\r\n if (isFoo) {\r\n bar();\r\n return 1;\r\n } else\r\n     return 0;\r\n }\r\n \/\/9.  Horstmann\u98ce\u683c\uff08\u683c\u5f0f\u7f29\u8fdb\u4f7f\u7528horstman\u65b9\u5f0f\uff0c\u62ec\u53f7\u7d27\u63a5\u8bed\u53e5\u5757\uff09\r\n     int Foo(bool isBar)\r\n         {  if (isBar)\r\n         {  bar();\r\n         return 1;\r\n } else\r\n     return 0;\r\n }   \r\n\r\n \/\/10.  1tbs\/otbs\u98ce\u683c\uff08\u683c\u5f0f\u7f29\u8fdb\u4f7f\u7528Linux \u65b9\u5f0f\u62ec\u53f7\uff0c\u81ea\u52a8\u8865\u5168\u5355\u884c\u8bed\u53e5\u5757\u62ec\u53f7\uff09\r\n int Foo(bool isBar)\r\n {\r\n     if (isFoo) {\r\n     bar();\r\n     return 1;\r\n } else {\r\n return 0;\r\n }\r\n }<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/\/1. Ansi\/Allman\/Bsd\u98ce\u683c\uff08\u683c\u5f0f\u7f29\u8fdb\u4ece\u4e0b\u4e00\u884c\u5f00\u59cb\u62ec&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,15],"tags":[63,78,44],"class_list":["post-900","post","type-post","status-publish","format-standard","hentry","category-Dream","category-Program","tag-63","tag-78","tag-44"],"_links":{"self":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/900","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=900"}],"version-history":[{"count":3,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/900\/revisions"}],"predecessor-version":[{"id":902,"href":"https:\/\/www.poloo.org\/index.php?rest_route=\/wp\/v2\/posts\/900\/revisions\/902"}],"wp:attachment":[{"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poloo.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}