{"id":1436,"date":"2024-04-05T07:28:42","date_gmt":"2024-04-04T23:28:42","guid":{"rendered":"https:\/\/wp.minicoda.com\/?p=1436"},"modified":"2024-09-25T20:22:55","modified_gmt":"2024-09-25T12:22:55","slug":"c%e8%af%ad%e8%a8%80%e4%b9%8b%e7%88%b6-b-nb-c%e8%af%ad%e8%a8%80%e7%9a%84%e6%95%85%e4%ba%8b","status":"publish","type":"post","link":"https:\/\/wp.minicoda.com\/index.php\/c%e8%af%ad%e8%a8%80%e4%b9%8b%e7%88%b6-b-nb-c%e8%af%ad%e8%a8%80%e7%9a%84%e6%95%85%e4%ba%8b\/","title":{"rendered":"B\/NB\/C\u8bed\u8a00\u7684\u6545\u4e8b"},"content":{"rendered":"\n<p>  C\u8bed\u8a00\u662f\u4eceB\u8bed\u8a00\u53d1\u5c55\u800c\u6765\uff0cB\u8bed\u8a00\u57fa\u4e8eBCPL\u8bed\u8a00\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">B\u8bed\u8a00<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>B\u8bed\u8a00\u6700\u65e9\u662fKen Thompson&nbsp;\u548c&nbsp;Dennis Ritchie&nbsp;\u4e8e 1969 \u5e74\u5de6\u53f3\u5728\u8d1d\u5c14\u5b9e\u9a8c\u5ba4\u5f00\u53d1\u7684\u4e00\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u4e3b\u8981\u57fa\u4e8eBCPL\u8bed\u8a00\uff0c\u5f53\u65f6Thompson\u5728Mulcs\u9879\u76ee\u4e2d\u4f7f\u7528\u7684\u8bed\u8a00\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>\/* The following program will calculate the constant e-2 to about\n   4000 decimal digits, and print it 50 characters to the line in\n   groups of 5 characters.  The method is simple output conversion\n   of the expansion\n     1\/2! + 1\/3! + ... = .111....\n   where the bases of the digits are 2, 3, 4, . . . *\/\n\nmain() {\n\textrn putchar, n, v;\n\tauto i, c, col, a;\n\n\ti = col = 0;\n\twhile(i&lt;n)\n\t\tv&#91;i++] = 1;\n\twhile(col&lt;2*n) {\n\t\ta = n+1;\n\t\tc = i = 0;\n\t\twhile (i&lt;n) {\n\t\t\tc =+ v&#91;i] *10;\n\t\t\tv&#91;i++]  = c%a;\n\t\t\tc =\/ a--;\n\t\t}\n\n\t\tputchar(c+'0');\n\t\tif(!(++col%5))\n\t\t\tputchar(col%50?' ': '*n');\n\t}\n\tputchar('*n*n');\n}\nv&#91;2000];\nn 2000;<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">B\u8bed\u8a00\u548cC\u8bed\u8a00\u7684\u533a\u522b<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>B\u8bed\u8a00\u4f5c\u4e3aC\u8bed\u8a00\u524d\u8eab\uff0c\u6765\u81eaBCPL\u8bed\u8a00\uff0cB\u8bed\u8a00\u548cC\u8bed\u8a00\u6700\u5927\u7684\u4e0d\u540c\u662f\uff0c\u5b83\u662f\u65e0\u7c7b\u578b\u7684\uff0c\u5728\u5176\u4ed6\u65b9\u9762\uff0c\u4f8b\u5982\u53d8\u91cf\u3001\u8868\u8fbe\u5f0f\u548c\u8fd0\u7b97\u7b26\u7b49\u7b49\u90fd\u548cC\u8bed\u8a00\u6709\u5f88\u5927\u76f8\u4f3c\u6027\u3002<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">B\u8bed\u8a00\u7684\u7956\u5148BCPL<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>BCPL\uff08Basic Combined Programming Language\uff09\u8bed\u8a00\u8d77\u6e90\u4e8e1967\u5e74\uff0c\u7531\u82f1\u56fd\u5251\u6865\u5927\u5b66\u7684Martin Richards\u5f00\u53d1\uff0c\u662f\u590d\u6742\u7684CPL\u7684\u7b80\u5316\u7248\u3002\u8fd9\u79cd\u8bed\u8a00\u88ab\u8bbe\u8ba1\u7528\u4e8e\u7f16\u5199\u7b80\u5355\u5c0f\u5de7\u7f16\u8bd1\u5668\u7684\u4ee3\u7801\uff0c\u5e76\u4e14\u5728\u5f53\u65f6\u88ab\u8ba4\u4e3a\u662f\u4e00\u79cd\u7b80\u6d01\u3001\u9ad8\u6548\u4e14\u6613\u4e8e\u79fb\u690d\u7684\u7f16\u7a0b\u8bed\u8a00\uff0c\u540e\u6765\u4e5f\u88ab\u7528\u4e8e\u7f16\u5199\u65e9\u671f\u7684\u64cd\u4f5c\u7cfb\u7edf\u3002BCPL\u8bed\u8a00\u662f\u5728\u65e9\u671f\u7f16\u7a0b\u8bed\u8a00\u5982Algol 60\u548cFortran\u7b49\u57fa\u7840\u4e0a\u53d1\u5c55\u8d77\u6765\u7684\uff0c\u65e8\u5728\u63d0\u4f9b\u4e00\u4e2a\u66f4\u4e3a\u7b80\u6d01\u548c\u5b9e\u7528\u7684\u7f16\u7a0b\u73af\u5883\u3002<\/li>\n\n\n\n<li>BCPL\u8bed\u8a00\u7684\u7279\u70b9\u5305\u62ec\u5176\u7b80\u6d01\u7684\u8bed\u6cd5\u3001\u5f3a\u5927\u7684\u6570\u636e\u5904\u7406\u80fd\u529b\u4ee5\u53ca\u8de8\u5e73\u53f0\u517c\u5bb9\u6027\u3002\u8fd9\u79cd\u8bed\u8a00\u572820\u4e16\u7eaa60\u5e74\u4ee3\u672b\u548c70\u5e74\u4ee3\u521d\u5728\u5251\u6865\u5927\u5b66\u548c\u5176\u4ed6\u5b66\u672f\u673a\u6784\u4e2d\u5f97\u5230\u4e86\u5e7f\u6cdb\u7684\u5e94\u7528\uff0c\u5e76\u5bf9\u540e\u6765\u7684\u7f16\u7a0b\u8bed\u8a00\u5982B\u548cC\u4ea7\u751f\u4e86\u6df1\u8fdc\u7684\u5f71\u54cd\u3002\u4e8b\u5b9e\u4e0a\uff0cB\u8bed\u8a00\u662fBCPL\u8bed\u8a00\u7684\u7b80\u5316\u7248\u672c\uff0c\u800cC\u8bed\u8a00\u53c8\u662f\u57fa\u4e8eB\u8bed\u8a00\u53d1\u5c55\u800c\u6765\u7684\u3002\u56e0\u6b64\uff0c\u53ef\u4ee5\u8bf4BCPL\u8bed\u8a00\u4e3a\u73b0\u4ee3\u7f16\u7a0b\u8bed\u8a00\u7684\u53d1\u5c55\u5960\u5b9a\u4e86\u57fa\u7840\u3002<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">NB\u8bed\u8a00<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>B\u8bed\u8a00\u6700\u65e9\u7528\u4e8ePDP-7\u7b49\u4e00\u4e9b\u8001\u5f0f\u56fa\u5b9a\u7c7b\u578b\u7684\u7535\u5b50\u8bbe\u5907\u4e0a\u6ca1\u6709\u95ee\u9898\uff0c\u4f46\u5728PDP-11\u4e0a\u5374\u662f\u4e2a\u4ee4\u4eba\u5934\u75bc\u7684\u4e8b\u60c5\uff0c\u56e0\u4e3a\u5b83\u6709\u4e0d\u540c\u7684\u7c7b\u578b\u3002Ritchie\u4ece1971\u5e74\u5f00\u59cb\u7740\u624b\u52a0\u5165\u6709\u7c7b\u578b\uff0c\u9010\u6e10\u53d8\u6210\u4e86\u6240\u8c13\u7684\"New B\"\u8bed\u8a00\uff0c\u5f88\u5feb\u5c31\u53d8\u6210\u5982\u4eca\u6240\u8bb2\u7684C\u8bed\u8a00\u3002\u4e8b\u5b9e\u4e0a\uff0c\u5728B\u8bed\u8a00\u4e4b\u524d\uff0c\u4f8b\u5982Fortran\u5c31\u6709\u7c7b\u578b\u7cfb\u7edf\uff0c\u53ea\u4e0d\u8fc7C\u8bed\u8a00\u53c8\u5c06\u7c7b\u578b\u7cfb\u7edf\u52a0\u5230B\u8bed\u8a00\u4e0a\uff0c\u89e3\u51b3\u5f53\u65f6\u7cfb\u7edf\u9047\u5230\u7684\u95ee\u9898\u3002<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">C\u8bed\u8a00\u4e4b\u7236\u5199\u7684C\u8bed\u8a00\u5386\u53f2<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5173\u4e8eC\u8bed\u8a00\u4e4b\u7236\u5199\u7684C\u8bed\u8a00\u5386\u53f2\uff0c\u6545\u4e8b\u7ec6\u8282\u592a\u591a\uff0c\u8bf7\u76f4\u63a5\u8bbf\u95ee\uff1a<a href=\"https:\/\/www.bell-labs.com\/usr\/dmr\/www\/chist.html\">C\u5386\u53f2 (bell-labs.com)<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>C\u8bed\u8a00\u662f\u4eceB\u8bed\u8a00\u53d1\u5c55\u800c\u6765\uff0cB\u8bed\u8a00\u57fa\u4e8eBCPL\u8bed\u8a00\u3002 B\u8bed\u8a00 B\u8bed\u8a00\u548cC\u8bed\u8a00\u7684\u533a\u522b B\u8bed\u8a00\u7684\u7956\u5148BCPL NB\u8bed\u8a00 C\u8bed\u8a00\u4e4b\u7236\u5199\u7684C\u8bed\u8a00\u5386\u53f2<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[299],"tags":[],"class_list":["post-1436","post","type-post","status-publish","format-standard","hentry","category-think"],"views":94,"_links":{"self":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/1436","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=1436"}],"version-history":[{"count":4,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/1436\/revisions"}],"predecessor-version":[{"id":2656,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/posts\/1436\/revisions\/2656"}],"wp:attachment":[{"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/media?parent=1436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/categories?post=1436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.minicoda.com\/index.php\/wp-json\/wp\/v2\/tags?post=1436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}