<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=BCPL</id>
	<title>BCPL - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=BCPL"/>
	<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=BCPL&amp;action=history"/>
	<updated>2026-07-08T11:01:25Z</updated>
	<subtitle>在这个wiki上该页的修订历史</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://arolstar52-zhtest.hf.space/index.php?title=BCPL&amp;diff=371109&amp;oldid=prev</id>
		<title>imported&gt;Mhss：​/* 範例 */</title>
		<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=BCPL&amp;diff=371109&amp;oldid=prev"/>
		<updated>2026-03-28T11:14:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;範例&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Infobox programming language&lt;br /&gt;
| name =  BCPL&lt;br /&gt;
| logo = &lt;br /&gt;
| paradigm =  [[过程式编程|过程式]]，[[指令式编程|指令式]]，[[结构化编程|结构化]]&lt;br /&gt;
| year     = {{start date and age|1967}}&amp;lt;ref name=&amp;quot;IEEE_CPA_MRichards&amp;quot;/&amp;gt;&lt;br /&gt;
| designer =  [[馬丁·理察德]]&lt;br /&gt;
| developer = &lt;br /&gt;
| latest_release_version = &lt;br /&gt;
| latest_release_date = &lt;br /&gt;
| latest_test_version = &lt;br /&gt;
| latest_test_date = &lt;br /&gt;
| typing                 = 无类型（所有东西都是[[字 (计算机)|字]]）&lt;br /&gt;
| implementations = &lt;br /&gt;
| dialects = &lt;br /&gt;
| influenced_by =  [[CPL语言|CPL]]&lt;br /&gt;
| influenced =  [[B语言|B]]（间接影响[[C语言|C]]），[[Go语言|Go]]&amp;lt;ref name=&amp;quot;hgophers&amp;quot;&amp;gt;{{cite web |url=https://talks.golang.org/2014/hellogophers.slide#21 |title=Hello Gophers |last=Pike |first=Rob |date=2014-04-24 |access-date=2016-03-11 }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
| operating_system = &lt;br /&gt;
| license = &lt;br /&gt;
| website = {{URL|https://www.cl.cam.ac.uk/~mr10/BCPL.html}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;基本組合編程語言&amp;#039;&amp;#039;&amp;#039;（{{langx|en|Basic Combined Programming Language}}），是一種電腦程式設計語言，源自更早的[[CPL語言|CPL]]語言，1967年由劍橋大學的[[馬丁·理察德]]所發展出來的&amp;lt;ref name=&amp;quot;IEEE_CPA_MRichards&amp;quot;&amp;gt;{{cite web |url=https://www.computer.org/web/awards/pioneer-martin-richards |title=Martin Richards (2003 Computer Pioneer Award) |author=&amp;lt;!--Not stated--&amp;gt; |publisher=IEEE Computer Society |date=&amp;lt;!--Not stated--&amp;gt; |access-date=2017-11-24 |archive-url=https://archive.today/20171124083723/https://www.computer.org/web/awards/pioneer-martin-richards |archive-date=2017-11-24 |dead-url=no }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
。&lt;br /&gt;
&lt;br /&gt;
==概述==&lt;br /&gt;
Richards試著移除了CPL中最複雜的組成，第一支BCPL compiler在[[IBM 7090|IBM 7094]]電腦中完成。身為早期程式語言的BCPL，如今已不再廣泛使用，但它的影響卻是深遠的，今日流行的[[C語言]]即是參考BCPL所設計&amp;lt;ref name=&amp;quot;C_Prog_Lang_KR&amp;quot;&amp;gt;{{cite book |url=https://archive.org/details/cprogramminglang00bria |title=The C Programming Language |date=1978 |publisher=Bell Telephone Laboratories |isbn=0-13-110163-3 |pages=2 |authors=Kernighan, Brian W. and Dennis M. Ritchie}}&amp;lt;/ref&amp;gt;。BCPL被认定为第一个{{le|花括号编程语言|Brace programming language}}&amp;lt;ref&amp;gt;{{cite web|url=https://www.cl.cam.ac.uk/~mr10/bcplman.pdf|title=The BCPL Cintsys and Cintpos User Guide, 2.1.4 Section brackets|quote=Historically BCPL used the symbols &amp;lt;code&amp;gt;$(&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;$)&amp;lt;/code&amp;gt; to bracket commands and declarations. These symbols are called section brackets and are allowed to be followed by tags composed of letters, digits, dots and underlines. A tagged closing section bracket is forced to match with its corresponding open section bracket by the automatic insertion of extra closing brackets. Use of this mechanism is no longer recommended since it often leads to obscure programming errors. BCPL has been extended to allow all untagged section brackets to be replaced by &amp;lt;code&amp;gt;{&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;}&amp;lt;/code&amp;gt; as appropriate.}}&amp;lt;/ref&amp;gt;，作为BCPL后代语言，[[C语言]]使用[[花括号]]来表示块结构。&lt;br /&gt;
&lt;br /&gt;
== 範例 ==&lt;br /&gt;
下列是馬丁查理斯的BCPL发行中的范例。&lt;br /&gt;
&lt;br /&gt;
打印[[阶乘]]：&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;basic&amp;quot;&amp;gt;&lt;br /&gt;
GET &amp;quot;LIBHDR&amp;quot;&lt;br /&gt;
&lt;br /&gt;
LET START() = VALOF $(&lt;br /&gt;
    FOR I = 1 TO 5 DO&lt;br /&gt;
        WRITEF(&amp;quot;%N! = %I4*N&amp;quot;, I, FACT(I))&lt;br /&gt;
    RESULTIS 0&lt;br /&gt;
$)&lt;br /&gt;
AND FACT(N) = N = 0 -&amp;gt; 1, N * FACT(N - 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[八皇后问题|N皇后問題]]：&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;basic&amp;quot;&amp;gt;&lt;br /&gt;
GET &amp;quot;LIBHDR&amp;quot;&lt;br /&gt;
&lt;br /&gt;
GLOBAL $(&lt;br /&gt;
    COUNT: 200&lt;br /&gt;
    ALL: 201&lt;br /&gt;
$)&lt;br /&gt;
&lt;br /&gt;
LET TRY(LD, ROW, RD) BE&lt;br /&gt;
    TEST ROW = ALL THEN&lt;br /&gt;
        COUNT := COUNT + 1&lt;br /&gt;
    ELSE $(&lt;br /&gt;
        LET POSS = ALL &amp;amp; ~(LD | ROW | RD)&lt;br /&gt;
        UNTIL POSS = 0 DO $(&lt;br /&gt;
            LET P = POSS &amp;amp; -POSS&lt;br /&gt;
            POSS := POSS - P&lt;br /&gt;
            TRY(LD + P &amp;lt;&amp;lt; 1, ROW + P, RD + P &amp;gt;&amp;gt; 1)&lt;br /&gt;
        $)&lt;br /&gt;
    $)  &lt;br /&gt;
&lt;br /&gt;
LET START() = VALOF $(&lt;br /&gt;
    ALL := 1&lt;br /&gt;
    FOR I = 1 TO 12 DO $(&lt;br /&gt;
        COUNT := 0&lt;br /&gt;
        TRY(0, 0, 0)&lt;br /&gt;
        WRITEF(&amp;quot;%I2-QUEENS PROBLEM HAS %I5 SOLUTIONS*N&amp;quot;, I, COUNT)&lt;br /&gt;
        ALL := 2 * ALL + 1&lt;br /&gt;
    $)&lt;br /&gt;
    RESULTIS 0&lt;br /&gt;
$)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==引用==&lt;br /&gt;
{{reflist|2}}&lt;br /&gt;
&lt;br /&gt;
== 參考文獻 ==&lt;br /&gt;
* Martin Richards, &amp;#039;&amp;#039;[https://web.archive.org/web/20080622171914/http://cm.bell-labs.com/cm/cs/who/dmr/bcpl.html The BCPL Reference Manual]&amp;#039;&amp;#039; (Memorandum M-352, Project MAC, Cambridge, July, 1967)&lt;br /&gt;
* Martin Richards, &amp;#039;&amp;#039;BCPL - a tool for compiler writing and systems programming&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Proceedings of the Spring Joint Computer Conference&amp;#039;&amp;#039;&amp;#039;, Vol 34, pp 557-566, 1969)&lt;br /&gt;
* Martin Richards, Arthur Evans, Robert F. Mabee, &amp;#039;&amp;#039;The BCPL Reference Manual&amp;#039;&amp;#039; (MAC TR-141, Project MAC, Cambridge, 1974)&lt;br /&gt;
* Martin Richards, C. Whitby-Strevens, &amp;#039;&amp;#039;BCPL, the language and its compiler&amp;#039;&amp;#039; (Cambridge University Press, 1980) ISBN 0-521-28681-6&lt;br /&gt;
&lt;br /&gt;
{{程序设计语言}}&lt;br /&gt;
&lt;br /&gt;
[[Category:过程式编程语言|BCPL]]&lt;br /&gt;
[[Category:1967年建立的程式語言]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Mhss</name></author>
	</entry>
</feed>