CPL語言

CPL
编程范型多范型: 过程式, 指令式, 结构化, 函数式
設計者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),但在浏览器中不一定能正确的显示出来这个§⃒。

引用

  1. ^ Peter Norvig. Prescient but Not Perfect: A Look Back at a 1966 Scientific American Article on Systems Analysis. Blogs.scientificamerican.com. [2013-08-18]. (原始内容存档于2015-05-03). 

参考书目

  • Collected papers of Christopher Strachey, section pertaining to CPL, archived at the Bodleian Library, Oxford; CSAC 71.1.80/C.136-C.184(页面存档备份,存于互联网档案馆
  • Barron, D. W.; Buxton, J. N.; Hartley, D. F.; Nixon, E.; Strachey, C. The Main Features of CPL. The Computer Journal. 1963-08-01, 6 (2): 134–143 [2021-10-18]. ISSN 0010-4620. doi:10.1093/comjnl/6.2.134. (原始内容存档于2022-02-14) (英语). 
  • J. Buxton, J. C. Gray, and D. Park. CPL Elementary Programming Manual, Edition II (Cambridge)(页面存档备份,存于互联网档案馆).
  • University of London Institute of Computer Science and The Mathematical Laboratory, Cambridge. CPL Working Papers(页面存档备份,存于互联网档案馆).

范型
过程式
面向对象
多范型
函数式
逻辑式
脚本语言
动态语言
Shell语言
ECMA-262
特定平台
.NET
JVM
特定领域
科学计算
GPU计算
  • Cg/HLSL
  • GLSL
  • Brook英语BrookGPU
  • OpenCL
  • CUDA/PTX英语Parallel Thread Execution
  • Futhark
  • SPIR-V英语Standard Portable Intermediate Representation
数据查询
可视化
传媒设计
 
其它
  • 分类 目录
  • 列表级条目 列表
  • 历史
  • 比较英语Comparison of programming languages
  • 时间线英语Timeline of programming languages