fbpx
维基百科

BCPL

基本組合編程語言(英語:Basic Combined Programming Language),是一種電腦程式設計語言,源自更早的CPL語言,1967年由劍橋大學的馬丁·理察德所發展出來的[1]

BCPL
编程范型过程式指令式结构化
設計者馬丁·理察德
发行时间1967年,​56年前​(1967[1]
型態系統无类型(所有东西都是
啟發語言
CPL
影響語言
B语言(间接影响C语言

概述

Richards試著移除了CPL中最複雜的組成,第一支BCPL compiler在IBM 7094電腦中完成。身為早期程式語言的BCPL,如今已不再廣泛使用,但它的影響卻是深遠的,今日流行的C語言即是參考BCPL所設計。BCPL是第一支括弧編程語言英语Brace programming language括弧特徵在C語言中隨處可見,例如:

LET FUNC foo(a) = VALOF { b := a + 1 RESULTIS b } 

範例

下列是馬丁查理斯的BCPL发行中的范例。

打印阶乘

GET "libhdr" LET start() = VALOF { FOR i = 1 TO 5 DO writef("fact(%n) = %i4*n", i, fact(i)) RESULTIS 0 } AND fact(n) = n=0 -> 1, n*fact(n-1) 

N個皇后問題

GET "libhdr" GLOBAL { count:200; all:201 } LET try(ld, row, rd) BE TEST row=all THEN count := count + 1 ELSE { LET poss = all & ~(ld | row | rd) UNTIL poss=0 DO { LET p = poss & -poss poss := poss - p try(ld+p << 1, row+p, rd+p >> 1) } } LET start() = VALOF { all := 1 FOR i = 1 TO 12 DO { count := 0 try(0, 0, 0) writef("Number of solutions to %i2-queens is %i5*n", i, count) all := 2*all + 1 } RESULTIS 0 } 

引用

  1. ^ 1.0 1.1 Martin Richards (2003 Computer Pioneer Award). IEEE Computer Society. [2017-11-24]. (原始内容存档于2017-11-24). 

參考文獻

  • Martin Richards, (Memorandum M-352, Project MAC, Cambridge, July, 1967)
  • Martin Richards, BCPL - a tool for compiler writing and systems programming (Proceedings of the Spring Joint Computer Conference, Vol 34, pp 557-566, 1969)
  • Martin Richards, Arthur Evans, Robert F. Mabee, The BCPL Reference Manual (MAC TR-141, Project MAC, Cambridge, 1974)
  • Martin Richards, C. Whitby-Strevens, BCPL, the language and its compiler (Cambridge University Press, 1980) ISBN 0-521-28681-6

bcpl, 基本組合編程語言, 英語, basic, combined, programming, language, 是一種電腦程式設計語言, 源自更早的cpl語言, 1967年由劍橋大學的馬丁, 理察德所發展出來的, 编程范型过程式, 指令式, 结构化設計者馬丁, 理察德发行时间1967年, 56年前, 1967, 型態系統无类型, 所有东西都是字, 啟發語言cpl影響語言b语言, 间接影响c语言, 目录, 概述, 範例, 引用, 參考文獻概述, 编辑richards試著移除了cpl中最複雜的組成, 第一支, . 基本組合編程語言 英語 Basic Combined Programming Language 是一種電腦程式設計語言 源自更早的CPL語言 1967年由劍橋大學的馬丁 理察德所發展出來的 1 BCPL编程范型过程式 指令式 结构化設計者馬丁 理察德发行时间1967年 56年前 1967 1 型態系統无类型 所有东西都是字 啟發語言CPL影響語言B语言 间接影响C语言 目录 1 概述 2 範例 3 引用 4 參考文獻概述 编辑Richards試著移除了CPL中最複雜的組成 第一支BCPL compiler在IBM 7094電腦中完成 身為早期程式語言的BCPL 如今已不再廣泛使用 但它的影響卻是深遠的 今日流行的C語言即是參考BCPL所設計 BCPL是第一支括弧編程語言 英语 Brace programming language 括弧特徵在C語言中隨處可見 例如 LET FUNC foo a VALOF b a 1 RESULTIS b 範例 编辑下列是馬丁查理斯的BCPL发行中的范例 打印阶乘 GET libhdr LET start VALOF FOR i 1 TO 5 DO writef fact n i4 n i fact i RESULTIS 0 AND fact n n 0 gt 1 n fact n 1 N個皇后問題 GET libhdr GLOBAL count 200 all 201 LET try ld row rd BE TEST row all THEN count count 1 ELSE LET poss all amp ld row rd UNTIL poss 0 DO LET p poss amp poss poss poss p try ld p lt lt 1 row p rd p gt gt 1 LET start VALOF all 1 FOR i 1 TO 12 DO count 0 try 0 0 0 writef Number of solutions to i2 queens is i5 n i count all 2 all 1 RESULTIS 0 引用 编辑 1 0 1 1 Martin Richards 2003 Computer Pioneer Award IEEE Computer Society 2017 11 24 原始内容存档于2017 11 24 參考文獻 编辑Martin Richards The BCPL Reference Manual Memorandum M 352 Project MAC Cambridge July 1967 Martin Richards BCPL a tool for compiler writing and systems programming Proceedings of the Spring Joint Computer Conference Vol 34 pp 557 566 1969 Martin Richards Arthur Evans Robert F Mabee The BCPL Reference Manual MAC TR 141 Project MAC Cambridge 1974 Martin Richards C Whitby Strevens BCPL the language and its compiler Cambridge University Press 1980 ISBN 0 521 28681 6 取自 https zh wikipedia org w index php title BCPL amp oldid 67037738, 维基百科,wiki,书籍,书籍,图书馆,

文章

,阅读,下载,免费,免费下载,mp3,视频,mp4,3gp, jpg,jpeg,gif,png,图片,音乐,歌曲,电影,书籍,游戏,游戏。