{"id":309,"date":"2023-10-13T20:41:06","date_gmt":"2023-10-13T12:41:06","guid":{"rendered":"https:\/\/wp.minicoda.com\/?p=309"},"modified":"2025-03-19T13:00:54","modified_gmt":"2025-03-19T05:00:54","slug":"%e9%80%bb%e8%be%91%e8%bf%90%e7%ae%97%e7%ac%a6","status":"publish","type":"post","link":"https:\/\/wp.minicoda.com\/index.php\/%e9%80%bb%e8%be%91%e8%bf%90%e7%ae%97%e7%ac%a6\/","title":{"rendered":"\u903b\u8f91\u8fd0\u7b97\u7b26"},"content":{"rendered":"\n<p>  \u903b\u8f91\u8fd0\u7b97\u7b26\u8fd4\u56de\u5e03\u5c14\u503c\uff0c\u7528\u4e8e\u5224\u65ad\u771f\u5047\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e0d\u540c\u5f62\u5f0f\u7684\u903b\u8f91\u8fd0\u7b97\u7b26<\/h2>\n\n\n\n<p>  \u5b9a\u4e49\u57fa\u672c\u7684\u903b\u8f91\u8fd0\u7b97\u7b26\uff1a&amp;&amp;  ||  !<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>C\/ObjC\/C++\/Java\/C#\/\u4ed3\u9889\/PHP\/Kotlin \u7b49\u4f7f\u7528\u57fa\u672c\u903b\u8f91\u8fd0\u7b97\u7b26&amp;&amp;\u548c||\u548c!\u8868\u793a\u4e0e\u3001\u6216\u3001\u975e\u3002<\/li>\n\n\n\n<li>\u4e8b\u5b9e\u4e0a\uff0cC\/C++ iso646.h\u4e5f\u63d0\u4f9b\u4e00\u5957\u66ff\u4ee3\u7b26\u53f7\uff0c\u7528and\/or\/not\u4ee3\u66ff\u903b\u8f91\u8fd0\u7b97\u7b26\uff0c\u672c\u8d28\u662f\u5b8f\u5b9a\u4e49\u3002<\/li>\n\n\n\n<li>Shell\u548cC\u7cfb\u8bed\u8a00\u7c7b\u4f3c\uff0c\u4e5f\u7528!\/&amp;&amp;\/||\u4ee3\u8868\u4e0d\u540c\u903b\u8f91\u7ec4\u5408\u3002<\/li>\n\n\n\n<li>SQL\u7528and\u3001or\u548cnot. <\/li>\n\n\n\n<li>Pascal\u903b\u8f91\u4e0e\u6216\u975e\u548c\u4f4d\u8fd0\u7b97\u7b26\u4e0e\u6216\u975e\u4e00\u6837: and or not. \u901a\u8fc7\u8fd0\u7b97\u6570\u7c7b\u578b\u51b3\u5b9a\uff0c\u5982\u679c\u662f\u5e03\u5c14\u7c7b\u578b\uff0cand\/or\/not\u4ee3\u8868\u903b\u8f91\u8fd0\u7b97\uff0c\u5426\u5219\u4ee3\u8868\u4f4d\u8fd0\u7b97\u3002<\/li>\n\n\n\n<li>Fortran \u903b\u8f91\u8fd0\u7b97\u7b26\u662f.and. .or. .not.\u4e09\u79cd\uff0c\u5224\u65ad\u4e24\u4e2a\u903b\u8f91\u503c\u76f8\u7b49.eqv.\u6216\u8005\u4e0d\u7b49.neqv.<\/li>\n\n\n\n<li>PHP \u989d\u5916\u652f\u6301 and \/ or \/ xor \u4e09\u79cd\u903b\u8f91\u8fd0\u7b97\u7b26\uff0c\u524d\u4e24\u8005\u548c &amp;&amp; \/ || \u542b\u4e49\u4e00\u81f4\uff0cxor\u8868\u793a\u4e24\u4e2a\u903b\u8f91\u503c\u5fc5\u987b\u4e00\u771f\u4e00\u5047\u624d\u4e3a\u771f\u3002\u7279\u522b\u6ce8\u610f\uff0cand \/ or \/ &amp;&amp; \/ || \u4f18\u5148\u7ea7\u4e0d\u540c\uff0c\u4f18\u5148\u7ea7\u9ad8\u4f4e\u4e3a\uff1a &amp;&amp;  ||  and  or.<\/li>\n\n\n\n<li>Python \u7528and\u548cor\u8868\u8fbe\u4e0e\u548c\u6216\uff0c\u8fd8\u63d0\u4f9b\u5173\u952e\u5b57 in \u548c not in\u6307\u4ee3\u53d8\u91cf\u662f\u5426\u5728\u5217\u8868\u4e2d\u3002<\/li>\n\n\n\n<li>VB \u7528 And \/ Or \/ Not \u8868\u793a\u903b\u8f91\u4e0e\u6216\u975e\uff0c\u53e6\u5916\u8fd8\u652f\u6301 Xor \u8868\u793a\u5f02\u6216\u3002\u6ce8\u610f\u8fd9\u91cc\u7684 Xor \u662f\u903b\u8f91\u8fd0\u7b97\u7b26\uff0c\u800c\u4e0d\u662f\u4f4d\u8fd0\u7b97\u7b26\u3002<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4f4d\u8fd0\u7b97\u7b26\u8868\u793a\u903b\u8f91\u8fd0\u7b97<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>C# \u652f\u6301\u5e03\u5c14\u7c7b\u578b\u53d8\u91cf\u7528 &amp; | ^ \u4f4d\u8fd0\u7b97\u7b26\u5b9e\u73b0\u903b\u8f91\u8fd0\u7b97&amp;&amp; || \u548c\u5f02\u6216\u64cd\u4f5c\u3002\u56e0\u4e3aC# bool\u7c7b\u578b\u672c\u8eab\u5c31\u662f0\u6216\u80051\uff0c\u4f4d\u8fd0\u7b97\u548c\u903b\u8f91\u8fd0\u7b97\u7ed3\u679c\u662f\u7edf\u4e00\u7684\u3002<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f18\u5148\u7ea7<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4e00\u822c\u800c\u8a00\uff0c! &gt; &amp;&amp;  &gt; || <\/li>\n\n\n\n<li>VB \u7684\u4f18\u5148\u7ea7\u987a\u5e8f\u662f:  Not  &gt;  And  &gt;  Or  &gt;  Xor.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u77ed\u8def\u8ba1\u7b97<\/h2>\n\n\n\n<p>  &amp;&amp;\u548c||\u5747\u652f\u6301\u77ed\u8def\u8ba1\u7b97\uff0c\u77ed\u8def\u8ba1\u7b97\u53ef\u63d0\u9ad8\u6548\u7387\u4e5f\u7b26\u5408\u4eba\u7c7b\u5e38\u8bc6\uff0c\u5f62\u5982\uff0c\u201d\u4f60\u90fd\u6ca1\u6765\u8fc7\uff0c\u8fd8\u5435\u5435\u5565\u201d\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5927\u90e8\u5206\u7f16\u7a0b\u8bed\u8a00\u652f\u6301\u77ed\u8def\u8ba1\u7b97\uff0c\u5305\u62ecC\u7cfb\u8bed\u8a00\u548cShell.\n<ul class=\"wp-block-list\">\n<li>C\/ObjC\/C++\/Java\/C#\/\u4ed3\u9889\/PHP\/Kotlin\/Shell \u7b49\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u8fde\u7eed\u7684\u903b\u8f91\u8868\u8fbe\u5f0f<\/h2>\n\n\n\n<p>  \u903b\u8f91\u8868\u8fbe\u5f0f\u5f88\u5bb9\u6613\u548c\u6570\u5b66\u7684\u6570\u503c\u8303\u56f4\u62c9\u4e0a\u5173\u7cfb\uff0c\u4f46\u8868\u8fbe\u5f0f\u201ci &lt; j &lt; k\u201d\u5728\u51e0\u4e4e\u6240\u6709\u7f16\u7a0b\u8bed\u8a00\u4e2d\u5e76\u4e0d\u80fd\u8868\u8fbei &lt; j &amp;&amp; j &lt; k.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>C\/ObjC\/C++\/Java\/C#\/VB \u7b49\u90fd\u4e0d\u652f\u6301\u5982\u4e0a\"\u8fde\u7eed\"\u7684\u903b\u8f91\u8868\u8fbe\u5f0f\u3002<\/li>\n\n\n\n<li>\u4e0d\u80fd\u7528\u8fde\u7eed\u7684\u903b\u8f91\u8868\u8fbe\u5f0f\u7684\u6839\u672c\u539f\u56e0\u662f\u8bed\u8a00\u8bed\u6cd5\u5b9a\u4e49\u4e86\u6e05\u6670\u7684\u4f18\u5148\u7ea7\u548c\u7ed3\u5408\u6027\uff0c\u4efb\u4f55\u64cd\u4f5c\u6570\u548c\u8fd0\u7b97\u7b26\u7684\u7ec4\u5408\u90fd\u5c06\u4ea7\u751f\u56fa\u5b9a\u7684\u8fd0\u7b97\uff0c\u4e0d\u7ba1\u662f\u5426\u662f\u8fde\u7eed\u7684\u8fd0\u7b97\u7b26\uff0c\u90fd\u5f97\u9010\u4e00\u8ba1\u7b97\u624d\u80fd\u8fdb\u5165\u4e0b\u4e00\u4e2a\u8ba1\u7b97\uff0c\u8fd9\u5bfc\u81f4\u4e86\u4e0d\u80fd\u6309\u4eba\u7c7b\u5e38\u89c1\u7684\u201d\u8fde\u7eed\u201d\u903b\u8f91\u8868\u8fbe\u5f0f\u53bb\u7406\u89e3\u3002<\/li>\n\n\n\n<li>\u6709\u7279\u4f8b\uff0cPython\u652f\u6301\u8fde\u7eed\u903b\u8f91\u8868\u8fbe\u5f0f\uff0c\u4f8b\u5982print(1 &lt; 10 &gt; 9)\u8fd4\u56deTrue, \u53c8\u88ab\u79f0\u4e3a\u94fe\u5f0f\u6bd4\u8f83(chained comparison)\u3002\n<ul class=\"wp-block-list\">\n<li>a &lt; f(x) &lt; b\u548ca &lt; f(x) and f(x) &lt; b\u6709\u5dee\u5f02\uff0c\u524d\u8005f(x)\u53ea\u4f1a\u8ba1\u7b97\u4e00\u6b21\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u903b\u8f91\u8fd0\u7b97\u7b26\u8fd4\u56de\u5e03\u5c14\u503c\uff0c\u7528\u4e8e\u5224\u65ad\u771f\u5047\u3002 \u4e0d\u540c\u5f62\u5f0f\u7684\u903b\u8f91\u8fd0\u7b97\u7b26 \u5b9a\u4e49\u57fa\u672c\u7684\u903b\u8f91\u8fd0\u7b97\u7b26\uff1a&amp;&amp; || ! \u4f4d\u8fd0\u7b97\u7b26\u8868\u793a\u903b\u8f91\u8fd0\u7b97 \u4f18\u5148\u7ea7 \u77ed\u8def\u8ba1\u7b97 &amp;&amp;\u548c||\u5747\u652f\u6301\u77ed\u8def\u8ba1\u7b97\uff0c\u77ed\u8def&#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":[8,20,112],"tags":[9,21,113],"class_list":["post-309","post","type-post","status-publish","format-standard","hentry","category-8","category-20","category-112","tag-9","tag-21","tag-113"],"views":85,"_links":{"self":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/309","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/comments?post=309"}],"version-history":[{"count":14,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/309\/revisions"}],"predecessor-version":[{"id":3998,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/309\/revisions\/3998"}],"wp:attachment":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/media?parent=309"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/categories?post=309"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/tags?post=309"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}