fbpx
维基百科

ALGOL 68

ALGOL 68(源自英語:ALGOrithmic Language 1968的縮寫),一種指令式程式語言,為ALGOL家族的成員,是官方上的ALGOL 60後繼者。它設計的目標,是提供更廣泛的應用,以及更嚴格的語法定義。

ALGOL 68
编程范型多范式指令式过程式结构化并发
設計者A. van Wijngaarden英语Adriaan van Wijngaarden, B.J. Mailloux英语Barry J. Mailloux, J.E.L. Peck英语John E. L. Peck, C.H.A. Koster英语Cornelis H.A. Koster等人
发行时间最终报告: 1968年,​56年前​(1968
型態系統静态强类型安全结构化
網站Revised Report on the Algorithmic Language ALGOL 68
主要實作產品
ALGOL 68C英语ALGOL 68C, ALGOL 68 Genie(新近[1]), ALGOL 68R英语ALGOL 68R, ALGOL 68RS英语ALGOL 68RS, ALGOL 68S英语ALGOL 68S, FLACC英语FLACC, Алгол 68 Ленинград, Odra ALGOL 68英语Odra (computer)
衍生副語言
ALGOL 68/FR (Final Report: 1968), Algol 68/RR (Revised Report: 1973)
啟發語言
ALGOL 60, ALGOL Y英语ALGOL Y
影響語言
C[3][5]C++[6]Bourne shellKornShellBashSteelman英语Steelman language requirementsAdaPython[7]Seed7英语Seed7Mary英语Mary (programming language)S3英语S3 (programming language)

概論 编辑

ALGOL 68由IFIP Working Group 2.1英语IFIP Working Group 2.1負責設計。1968年12月20日,Working Group 2.1 通過了這個語法規範,並提交IFIP大會通過。它的主要架構者為阿德里安·范·韦恩加登英语Adriaan van Wijngaarden

代码样例 编辑

下面的样例代码实现了埃拉托斯特尼筛法来找到小于等于100的所有素数。ALGOL 68中NIL是同其他语言中“空指针”的类似者,表示法x OF y访问STRUCT y的成员x

BEGIN # Algol-68素数筛法,函数式风格 #  MODE LIST = REF NODE;  MODE NODE = STRUCT (INT h, LIST t);  PROC cons = (INT n, LIST l) LIST: HEAP NODE := (n, l);  PROC one to = (INT n) LIST:  (PROC f = (INT m) LIST: (m > n | NIL | cons(m, f(m+1))); f(1));  PROC error = (STRING s) VOID:  (print((newline, " error: ", s, newline)); GOTO stop);  PROC hd = (LIST l) INT: (l IS NIL | error("hd NIL"); SKIP | h OF l);  PROC tl = (LIST l) LIST: (l IS NIL | error("tl NIL"); SKIP | t OF l);  PROC show = (LIST l) VOID:  (l ISNT NIL | print((" ", whole(hd(l), 0))); show(tl(l)) | print(newline));    PROC filter = (PROC (INT) BOOL p, LIST l) LIST:  IF l IS NIL THEN NIL  ELIF p(hd(l)) THEN cons(hd(l), filter(p, tl(l)))  ELSE filter(p, tl(l))  FI;    PROC sieve = (LIST l) LIST:  IF l IS NIL THEN NIL  ELSE  PROC not multiple = (INT n) BOOL: n MOD hd(l)  0;  cons(hd(l), sieve(filter(not multiple, tl(l))))  FI;  PROC primes = (INT n) LIST: sieve(tl(one to(n)));    show(primes(100)) END 

将上述代码保存入文本文件primes.a68中,并将其中替代为/=,然后使用ALGOL 68 Genie执行它:

$ a68g -quiet primes.a68  2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 

註釋 编辑

  1. ^ . [2020-04-22]. (原始内容存档于2020-08-14). 
  2. ^ Dennis Ritchie. The Development of the C Language (PDF). April 1993 [2007-04-26]. (原始内容 (PDF)存档于2005-06-29). 
  3. ^ Influence on C: types, structures, arrays, pointers and procedures – Dennis Ritchie[2]
  4. ^ Dennis Ritchie. C and Algol 68. June 1988 [2006-09-15]. (原始内容于2009-08-27). 
  5. ^ Influence on C: union, structure, syntax and long precision – Dennis Ritchie[4]
  6. ^ A History of C++: 1979−1991 (PDF). Page 12, 2nd paragraph: Algol68 [gave] operator overloading(§3.3.3), references (§3.3.4), and the ability to declare variables anywhere in a block (§3.3.1). March 1993 [2008-05-06]. (原始内容 (PDF)于2006-12-10). 
  7. ^ . July 1998 [2007-04-29]. (原始内容存档于2007-05-01). 

外部链接 编辑

  • Revised Report on the Algorithmic Language ALGOL 68(页面存档备份,存于互联网档案馆) The official reference for users and implementors of the language (large pdf file, scanned from Algol Bulletin)
  • Revised Report on the Algorithmic Language ALGOL 68(页面存档备份,存于互联网档案馆) Hyperlinked HTML version of the Revised Report
  • A Tutorial on Algol 68, by Andrew S. Tanenbaum, in Computing Surveys, Vol. 8, No. 2, June 1976, with Corrigenda (Vol. 9, No. 3, September 1977)
  • Algol 68 Genie – a GNU GPL Algol 68 compiler-interpreter(页面存档备份,存于互联网档案馆
  • Open source Algol 68 implementations, on SourceForge(页面存档备份,存于互联网档案馆
  • Algol68 Standard Hardware representation (.pdf)(页面存档备份,存于互联网档案馆
  • Из истории создания компилятора с Алгол 68(页面存档备份,存于互联网档案馆
  • Algol 68 – 25 Years in the USSR(页面存档备份,存于互联网档案馆
  • McJones, Paul, "Algol 68 implementations and dialects"(页面存档备份,存于互联网档案馆), Software Preservation Group, Computer History Museum, 2011-07-05
  • Web enabled ALGOL 68 compiler for small experiments

algol, 源自英語, algorithmic, language, 1968, 的縮寫, 一種指令式程式語言, 為algol家族的成員, 是官方上的algol, 60後繼者, 它設計的目標, 是提供更廣泛的應用, 以及更嚴格的語法定義, 编程范型多范式, 指令式, 过程式, 结构化, 并发設計者a, wijngaarden, 英语, adriaan, wijngaarden, mailloux, 英语, barry, mailloux, peck, 英语, john, peck, koster, 英语, cor. ALGOL 68 源自英語 ALGOrithmic Language 1968 的縮寫 一種指令式程式語言 為ALGOL家族的成員 是官方上的ALGOL 60後繼者 它設計的目標 是提供更廣泛的應用 以及更嚴格的語法定義 ALGOL 68编程范型多范式 指令式 过程式 结构化 并发設計者A van Wijngaarden 英语 Adriaan van Wijngaarden B J Mailloux 英语 Barry J Mailloux J E L Peck 英语 John E L Peck C H A Koster 英语 Cornelis H A Koster 等人发行时间最终报告 1968年 56年前 1968 型態系統静态 强类型 安全 结构化網站Revised Report on the Algorithmic Language ALGOL 68主要實作產品ALGOL 68C 英语 ALGOL 68C ALGOL 68 Genie 新近 1 ALGOL 68R 英语 ALGOL 68R ALGOL 68RS 英语 ALGOL 68RS ALGOL 68S 英语 ALGOL 68S FLACC 英语 FLACC Algol 68 Leningrad Odra ALGOL 68 英语 Odra computer 衍生副語言ALGOL 68 FR Final Report 1968 Algol 68 RR Revised Report 1973 啟發語言ALGOL 60 ALGOL Y 英语 ALGOL Y 影響語言C 3 5 C 6 Bourne shell KornShell Bash Steelman 英语 Steelman language requirements Ada Python 7 Seed7 英语 Seed7 Mary 英语 Mary programming language S3 英语 S3 programming language 目录 1 概論 2 代码样例 3 註釋 4 外部链接概論 编辑ALGOL 68由IFIP Working Group 2 1 英语 IFIP Working Group 2 1 負責設計 1968年12月20日 Working Group 2 1 通過了這個語法規範 並提交IFIP大會通過 它的主要架構者為阿德里安 范 韦恩加登 英语 Adriaan van Wijngaarden 代码样例 编辑下面的样例代码实现了埃拉托斯特尼筛法来找到小于等于100的所有素数 ALGOL 68中NIL是同其他语言中 空指针 的类似者 表示法x OF y访问STRUCT y的成员x BEGIN Algol 68素数筛法 函数式风格 MODE LIST REF NODE MODE NODE STRUCT INT h LIST t PROC cons INT n LIST l LIST HEAP NODE n l PROC one to INT n LIST PROC f INT m LIST m gt n NIL cons m f m 1 f 1 PROC error STRING s VOID print newline error s newline GOTO stop PROC hd LIST l INT l IS NIL error hd NIL SKIP h OF l PROC tl LIST l LIST l IS NIL error tl NIL SKIP t OF l PROC show LIST l VOID l ISNT NIL print whole hd l 0 show tl l print newline PROC filter PROC INT BOOL p LIST l LIST IF l IS NIL THEN NIL ELIF p hd l THEN cons hd l filter p tl l ELSE filter p tl l FI PROC sieve LIST l LIST IF l IS NIL THEN NIL ELSE PROC not multiple INT n BOOL n MOD hd l 0 cons hd l sieve filter not multiple tl l FI PROC primes INT n LIST sieve tl one to n show primes 100 END 将上述代码保存入文本文件primes a68中 并将其中 替代为 然后使用ALGOL 68 Genie执行它 a68g quiet primes a68 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97註釋 编辑 ALGOL 68 Genie 2020 04 22 原始内容存档于2020 08 14 Dennis Ritchie The Development of the C Language PDF April 1993 2007 04 26 原始内容 PDF 存档于2005 06 29 Influence on C types structures arrays pointers and procedures Dennis Ritchie 2 Dennis Ritchie C and Algol 68 June 1988 2006 09 15 原始内容存档于2009 08 27 Influence on C union structure syntax and long precision Dennis Ritchie 4 A History of C 1979 1991 PDF Page 12 2nd paragraph Algol68 gave operator overloading 3 3 3 references 3 3 4 and the ability to declare variables anywhere in a block 3 3 1 March 1993 2008 05 06 原始内容存档 PDF 于2006 12 10 Interview with Guido van Rossum July 1998 2007 04 29 原始内容存档于2007 05 01 外部链接 编辑Revised Report on the Algorithmic Language ALGOL 68 页面存档备份 存于互联网档案馆 The official reference for users and implementors of the language large pdf file scanned from Algol Bulletin Revised Report on the Algorithmic Language ALGOL 68 页面存档备份 存于互联网档案馆 Hyperlinked HTML version of the Revised Report A Tutorial on Algol 68 by Andrew S Tanenbaum in Computing Surveys Vol 8 No 2 June 1976 with Corrigenda Vol 9 No 3 September 1977 Algol 68 Genie a GNU GPL Algol 68 compiler interpreter 页面存档备份 存于互联网档案馆 Open source Algol 68 implementations on SourceForge 页面存档备份 存于互联网档案馆 Algol68 Standard Hardware representation pdf 页面存档备份 存于互联网档案馆 Iz istorii sozdaniya kompilyatora s Algol 68 页面存档备份 存于互联网档案馆 Algol 68 25 Years in the USSR 页面存档备份 存于互联网档案馆 Sistema programm dinamicheskoj podderzhki dlya translyatora s Algol 68 C history with Algol68 heritage McJones Paul Algol 68 implementations and dialects 页面存档备份 存于互联网档案馆 Software Preservation Group Computer History Museum 2011 07 05 Web enabled ALGOL 68 compiler for small experiments 取自 https zh wikipedia org w index php title ALGOL 68 amp oldid 78953607, 维基百科,wiki,书籍,书籍,图书馆,

文章

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