{"id":740,"date":"2023-10-29T17:30:19","date_gmt":"2023-10-29T09:30:19","guid":{"rendered":"https:\/\/wp.minicoda.com\/?p=740"},"modified":"2025-03-21T13:24:36","modified_gmt":"2025-03-21T05:24:36","slug":"%e5%87%bd%e6%95%b0%e8%bf%94%e5%9b%9e%e5%80%bc","status":"publish","type":"post","link":"https:\/\/wp.minicoda.com\/index.php\/%e5%87%bd%e6%95%b0%e8%bf%94%e5%9b%9e%e5%80%bc\/","title":{"rendered":"\u51fd\u6570\u8fd4\u56de\u503c"},"content":{"rendered":"\n<p>  \u4eba\u4e3a\u8d22\u6b7b\u9e1f\u4e3a\u98df\u4ea1\u3002\u5929\u4e0b\u7199\u7199\u7686\u4e3a\u5229\u6765\uff0c\u5929\u4e0b\u6518\u6518\u7686\u4e3a\u5229\u5f80\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e0d\u540c\u8bed\u8a00\u7684\u8fd4\u56de\u503c<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5927\u90e8\u5206\u7f16\u7a0b\u8bed\u8a00\u4f7f\u7528 return <strong><em>[val]<\/em><\/strong> \u4f5c\u4e3a\u8fd4\u56de\u503c\u3002C\u7cfb\u8bed\u8a00\u548cShell\u90fd\u662f\u5982\u6b64\u3002<br>C\/ObjC\/C++\/Java\/C#\/Python\/Shell\/\u4ed3\u9889 \u7b49\u3002<\/li>\n\n\n\n<li>Shell\u6709\u70b9\u7279\u6b8a\uff0c\u5982\u679c\u6ca1\u6307\u5b9areturn, \u5c06\u6700\u540e\u4e00\u6761\u547d\u4ee4\u9000\u51fa\u72b6\u6001\u4f5c\u4e3a\u8fd4\u56de\u503c\u3002<\/li>\n\n\n\n<li>VB \u6ca1\u6709Return\u8bed\u53e5(VB.Net\u624d\u6709)\uff0c\u51fd\u6570\u540d\u4f5c\u4e3a\u8fd4\u56de\u503c\uff0c\u51fd\u6570\u8fd4\u56de\u503c\u53ef\u4ee5\u4f20\u9012\u7ed9\u51fd\u6570\u540d\u8fd4\u56de\u3002<\/li>\n\n\n\n<li>\u4ed3\u9889 \u4e0d\u4e00\u5b9a\u9700\u8981\u4e3a\u51fd\u6570\u6307\u5b9a\u8fd4\u56de\u503c\uff0c\u7f16\u8bd1\u5668\u6839\u636e\u51fd\u6570\u5b9e\u73b0\u53ef\u4ee5\u63a8\u6d4b\u8fd4\u56de\u503c\u3002<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u591a\u4e2a\u8fd4\u56de\u503c?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5927\u90e8\u5206\u65e9\u671f\u7684\u7f16\u7a0b\u8bed\u8a00\u4e0d\u652f\u6301\u591a\u4e2a\u8fd4\u56de\u503c\uff0c\u56e0\u4e3a\u4f1a\u8ba9\u95ee\u9898\u53d8\u5f97\u590d\u6742\u3002\u6bd4\u5982\uff1a\n<ul class=\"wp-block-list\">\n<li>C\/ObjC\/C++\/PHP \u7b49\u3002<\/li>\n\n\n\n<li>\u4f46\u5e76\u4e0d\u610f\u5473\u65e0\u6cd5\u8fd4\u56de\u591a\u4e2a\u503c\uff0c\u53ef\u4ee5\u5229\u7528\u6307\u9488\u53c2\u6570\u4f20\u51fa\u8fd4\u56de\u503c\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Python\/Go \u90fd\u652f\u6301\u51fd\u6570\u7684\u591a\u4e2a\u8fd4\u56de\u503c\u3002<br> \u4f8b\u5982Python\u8fd4\u56de\u4e24\u4e2a\u6574\u6570\uff1a<br> def test():<br> return (2, 3)<\/li>\n\n\n\n<li>C# 7.0\u652f\u6301\u8fd4\u56de\u5143\u7ec4\u5b9e\u73b0\u591a\u4e2a\u8fd4\u56de\u503c\uff0c\u5728\u6b64\u4e4b\u524d\uff0c\u5fc5\u987b\u7528out\u53c2\u6570\u6765\u6784\u9020\u591a\u4e2a\u8fd4\u56de\u503c\u3002<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u6210\u529f\u8fd4\u56de<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Shell\u51fd\u6570\u8fd4\u56de\u548c\u547d\u4ee4\u8fd4\u56de\u9075\u5faa\u76f8\u540c\u539f\u5219\uff0c\u8fd4\u56de0\u4ee3\u8868\u6210\u529f\uff0c\u975e0\u4ee3\u8868\u5931\u8d25\u3002\u8fd9\u4e0e\u7f16\u8bd1\u578b\u8bed\u8a00\u51fd\u6570\u8fd4\u56de\u4e0d\u592a\u4e00\u6837\u3002<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7b80\u6d01\u8fd4\u56de<\/h3>\n\n\n\n<p>  \u6709\u4e9b\u51fd\u6570\u8fd4\u56de\u503c\u4ec5\u4ec5\u662f\u5bf9\u53c2\u6570\u7684\u7b80\u5355\u64cd\u4f5c\uff0c\u4e00\u4e9b\u7f16\u7a0b\u8bed\u8a00\u63d0\u4f9b\u7b80\u6d01\u7684\u8fd4\u56de\u65b9\u5f0f\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>C# 6.0\u5f15\u5165\u4e86expression-bodied methods, \u53ef\u5c06\u4e00\u4e2a\u8868\u8fbe\u5f0f\u5f53\u505a\u51fd\u6570\u8fd4\u56de\u503c\u3002<br>public int Add(int a, int b) =&gt; a + b;<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u51fd\u6570\u8fd4\u56de\u4e4b\u540e\u6709\u5176\u4ed6\u8bed\u53e5?<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>C# \u4f1a\u8b66\u544a\u8fd9\u79cd\u4ee3\u7801\u3002<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4eba\u4e3a\u8d22\u6b7b\u9e1f\u4e3a\u98df\u4ea1\u3002\u5929\u4e0b\u7199\u7199\u7686\u4e3a\u5229\u6765\uff0c\u5929\u4e0b\u6518\u6518\u7686\u4e3a\u5229\u5f80\u3002 \u4e0d\u540c\u8bed\u8a00\u7684\u8fd4\u56de\u503c \u591a\u4e2a\u8fd4\u56de\u503c? \u6210\u529f\u8fd4\u56de \u7b80\u6d01\u8fd4\u56de \u6709\u4e9b\u51fd\u6570\u8fd4\u56de\u503c\u4ec5\u4ec5\u662f\u5bf9\u53c2\u6570\u7684\u7b80\u5355\u64cd\u4f5c\uff0c\u4e00\u4e9b\u7f16\u7a0b\u8bed\u8a00\u63d0\u4f9b\u7b80\u6d01\u7684\u8fd4\u56de\u65b9\u5f0f\u3002 \u51fd\u6570\u8fd4\u56de\u4e4b\u540e\u6709\u5176\u4ed6\u8bed&#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":[41,8,136],"tags":[43,9,137],"class_list":["post-740","post","type-post","status-publish","format-standard","hentry","category-41","category-8","category-136","tag-43","tag-9","tag-137"],"views":96,"_links":{"self":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/740","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=740"}],"version-history":[{"count":17,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/740\/revisions"}],"predecessor-version":[{"id":4037,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/740\/revisions\/4037"}],"wp:attachment":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/media?parent=740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/categories?post=740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/tags?post=740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}