编程范型 | 多范型: 过程式, 指令式, 结构化, 函数式 |
---|---|
設計者 | Christopher Strachey等 |
发行时间 | 1963年,61年前(1963) |
啟發語言 | |
ALGOL 60 | |
影響語言 | |
BCPL, POP-2 |
CPL(英語:Combined Programming Language,原名Cambridge Programming Language),一種計算機程式語言。源自於ALGOL 60,在1963年,由英国的剑桥大学和伦敦大学首先開發出來。CPL语言在ALGOL 60的基础上更接近硬件一些,但规模比较大,难以实现。BCPL是它的後繼語言。
函数MAX由Peter Norvig公式化为如下[1]:
Max(Items, ValueFunction) = value of§ (Best, BestVal) = (NIL, -∞) while Items do § (Item, Val) = (Head(Items), ValueFunction(Head(Items))) if Val > BestVal then (Best, BestVal) := (Item, Val) Items := Rest(Items) §⃒ result is Best §⃒
与开符号§
相匹配的闭符号是有竖杠贯穿的§
。这个符号在Unicode中可以复合为§⃒
,它是§
(U+00A7)复合于 ⃒
(U+20D2),但在浏览器中不一定能正确的显示出来这个§⃒。