A Brief Description and Comparison of Programming Languages FORTRAN, ALGOL, COBOL, and LISP 1.5 from a Critical Standpoint

Total Page:16

File Type:pdf, Size:1020Kb

A Brief Description and Comparison of Programming Languages FORTRAN, ALGOL, COBOL, and LISP 1.5 from a Critical Standpoint https://ntrs.nasa.gov/search.jsp?R=19720025540 2018-03-05T17:43:28+00:00Z NATIONAL AERONAUTICS AND SPACE ADMINISTRATION Technical Memorandum 33-566 A Brief Description and Comparison of Programming Languages FORTRAN, ALGOL, COBOL, PLII, and LISP 1.5 From a Critical Standpoint F. P. Mathur JET PROPULSION LABORATORY CALIFORNIA INSTITUTE OF TECHNOLOGY PASADENA, CALIFORNIA September 15, 1972 Reproduced by NATIONAL TECHNICAL INFORMATION SERVICE U S Department of Commerce Springfield VA 22151 TECHNICAL REPORT STANDARD TITLE PAGE I. Report No. 33-566 2. Government Accession No. 3. Recipient's Catalog No. 4. Title and Subtitle 5. Report Date A BRIEF DESCRIPTION AND COMPARISON OF PROGRAMMING September 15, 1972 LANGUAGES FORTRAN, ALGOL, COBOL, PL/I, AND LISP 6. Performing Organization Code 1.5 FROM A CRITICAL STANDPOINT 7. Author(s) 8. Performing Organization Report No. F. P. Mathur 9. Performing Organization Name and Address 10. Work Unit No. JET PROPULSION LABORATORY California Institute of Technology 11. Contract or Grant No. 4800 Oak Grove Drive NAS 7-100 Pasadena, California 91103 13. Type of Report and Period Covered Technical Memorandum 12. Sponsoring Agency Name and Address NATIONAL AERONAUTICS AND SPACE ADMINISTRATION Washington, D.C. 20546 14. Sponsoring Agency Code 15. Supplementary Notes 16. Abstract Several common higher level program languages are described. FORTRAN, ALGOL, COBOL, PL/I, and LISP 1.5 are summarized and compared. FORTRAN is the most widely used scientific programming language. ALGOL is a more powerful language for scientific programming. COBOL is used for most commercial programming applications. LISP 1.5 is primarily a list-processing language. PL/I attempts to combine the desirable features of FORTRAN, ALGOL, and COBOL into a single language. 17. Key Words (Selected by Author(s)) 18. Distribution Statement Computer Applications and Equipment Unclassified -- Unlimited Computer Programs 19. Security Classif. (of this report) 20. Security Classif. (of this page) 21. No. of Pages 22. Price Unclassified Unclassified 13 T HOW TO FILL OUT THE TECHNICAL REPORT STANDARD TITLE PAGE Make items 1, 4, 5, 9, 12, and 13 agree with the corresponding information on the report cover. Use all capital letters for title (item 4). Leave items 2, 6, and ~14 blank. Complete the remaining items as follows: 3. Recipient's Catalog No. Reserved for use by report recipients. 7. Author(s). Include corresponding information from the report cover. In addition, list the affiliation of an author if it differs from that of the performing organization. 8. Performing Organization Report No. Insert if performing organization wishes to assign this number. 10. Work Unit No. Use the agency-wide code (for example, 923-50-10-06-72), which uniquely identifies the work unit under which the work was authorized. Non-NASA performing organizations will leave this blank. 11. Insert the number of the contract or grant under which the report was pre pared. 15. Supplementary Notes. Enter information not included elsewhere but useful, such as: Prepared in cooperation with... Translation of (or by)... Presented at conference of... To be published in... 16. Abstract. Include a brief (not to exceed 200 words) factual summary of the most significant information contained in the report. If possible, the abstract of a classified report should be unclassified. If the report contains a significant bibliography or literature survey, mention it here. 17. Key Words. Insert terms or short phrases selected by the author that identify the principal subjects covered in the report, and that are sufficiently specific and precise to be used for cataloging. 18. Distribution Statement. Enter one of the authorized statements used to denote releasability to the public or a limitation on dissemination for reasons other than security of defense information. Authorized statements are "Unclassified-Unlimited, " "U.S. Government and Contractors only, " "U. S. Government Agencies only, " and "NASA and NASA Contractors only." 19. Security Classification (of report). NOTE: Reports carrying a security classification will require additional markings giving security and down- grading information as specified by the Security Requirements Checklist and the DoD Industrial Security Manual (DoD 5220. 22-M). 20. Security Classification (of this page). NOTE: Because this page may be used in preparing announcements, bibliographies, and data banks, it should be unclassified if possible. If a classification is required, indicate sepa- rately the classification of the title and the abstract by following these items with either "(U)" for unclassified, or "(C)" or "(S)" as applicable for classified items. 21. No. of Pages. Insert the number of pages. 22. Price. Insert the price set by the Clearinghouse for Federal Scientific and Technical Information or the Government Printing Office, if known. I- NATIONAL AERONAUTICS AND SPACE ADMINISTRATION Technical Memorandum 33-566 A Brief Description and Comparison of Programming Languages FORTRAN, ALGOL, COBOL, PLII, and LISP 1.5 From a Critical Standpoint F. P. Mathur JET PROPULSION LABORATORY CALIFORNIA INSTITUTE OF TECHNOLOGY PASADENA, CALIFORNIA September 15, 1972 ( Prepared Under Contract No. NAS-7-100 National Aeronautics and Space Administration Preface The work described in this report was performed by the Astrionics Divi- sion of the Jet Propulsion Laboratory. JPL TECHNICAL MEMORANDUM 33-566 iii PRECEDING PAGE BLANK NOT FILMEf Contents I. Introduction ........... 1 II. Basic Philosophy of Programming Languages 2 III. Metalanguages .......... 2 IV. FORTRAN (Formula Translation). V. ALGOL (Arithmetic Language). 4 VI. COBOL (Common Business Language) 5 VII. LISP 1.5 (List Processing Language) . 7 VIII. PL/I (Programming Language I) 8 IX. Conclusion ............ ...... .......10 References ..... ...10 Bibliography . ..... ...12 Figures 1. Process of compiling an object program 11 JPL TECHNICAL MEMORANDUM 33-566 Preceding page blank v Abstract Several common higher level program languages are described. FORTRAN, ALGOL, COBOL, PL/I, and LISP 1.5 are summarized and compared. FOR- TRAN is the most widely used scientific programming language. ALGOL is a more powerful language for scientific programming. COBOL is used for most commercial programming applications. LISP 1.5 is primarily a list-pro- cessing language. PL/I attempts to combine the desirable features of FOR- TRAN, ALGOL, and COBOL into a single language. vi JPL TECHNICAL MEMORANDUM 33-566 A Brief Description and Comparison of Programming Languages FORTRAN, ALGOL, COBOL, PL/I, and LISP 1.5 From a Critical Standpoint I. Introduction lated into an object program that is in machine language - the binary language in which a computer basically Explicit procedures, namely, algorithms or programs operates. The process of compiling an object program for the solution of mathematically structurable prob- from a source program is shown in Fig. 1. lems, require a notation and syntactic structure for their description. Such systems of notation are called In the early days of computers, all programming was programming languages. done in machine language. From the standpoint of the computer, the machine language programming is the The solution of a problem by means of computer facil- most efficient; however, it requires that the program- ity consists of explicitly delineating the steps or com- mer be familiar with the internal organization and de- mands that a computer should follow in order to pro- sign of the computer. As computer applications became duce the solution. The computer must be instructed in widespread, higher level languages were developed the manner in which it must expect to receive the data that separated the user from the designer and became to be acted upon. This data and the format of the solu- more user oriented. At first these languages were oriented tions must be presented to the computer in a prescribed toward the scientist programmer and were strictly for manner. Though the computer is incapable of formulat- scientific applications. As computer applications broad- ing these procedures, its forte lies in following the com- ened toward data processing and business-type appli- mands with great speed. cations, business-oriented languages came into being. As a next step these two main, though basically diver- The algorithm, which may be in the form of a flow gent, orientations were and are being incorporated with- chart, and the data are coded in the source language in the same language. The success of truly general-pur- (the subject of this paper) and inputed to a compiler pose languages as measured by widespread acceptance where it is compiled, assembled, and effectively trans- is yet to be seen. JPL TECHNICAL MEMORANDUM 33-566 1 II. Basic Philosophy of Programming Languages This metalanguage employs four characters which are unrelated to, and distinct from, the programming lan- A significant difference between natural languages guage under description. These are the metalinguistic and programming languages is, that due to the nonin- brackets '<' and '>' which are used to enclose names of telligent nature of the computer, no ambiguities in the things about which the metalanguage is talking,' programming language may exist. The language must which means "is," and 'i' which means "or," Thus be context free; hence, it is not subject to growth and spontaneous development. <digit> ::= 0111213141516171819 The ideal problem-oriented source language designed for wide use must possess the characteristics
Recommended publications
  • Typology of Programming Languages E Early Languages E
    Typology of programming languages e Early Languages E Typology of programming languages Early Languages 1 / 71 The Tower of Babel Typology of programming languages Early Languages 2 / 71 Table of Contents 1 Fortran 2 ALGOL 3 COBOL 4 The second wave 5 The finale Typology of programming languages Early Languages 3 / 71 IBM Mathematical Formula Translator system Fortran I, 1954-1956, IBM 704, a team led by John Backus. Typology of programming languages Early Languages 4 / 71 IBM 704 (1956) Typology of programming languages Early Languages 5 / 71 IBM Mathematical Formula Translator system The main goal is user satisfaction (economical interest) rather than academic. Compiled language. a single data structure : arrays comments arithmetics expressions DO loops subprograms and functions I/O machine independence Typology of programming languages Early Languages 6 / 71 FORTRAN’s success Because: programmers productivity easy to learn by IBM the audience was mainly scientific simplifications (e.g., I/O) Typology of programming languages Early Languages 7 / 71 FORTRAN I C FIND THE MEAN OF N NUMBERS AND THE NUMBER OF C VALUES GREATER THAN IT DIMENSION A(99) REAL MEAN READ(1,5)N 5 FORMAT(I2) READ(1,10)(A(I),I=1,N) 10 FORMAT(6F10.5) SUM=0.0 DO 15 I=1,N 15 SUM=SUM+A(I) MEAN=SUM/FLOAT(N) NUMBER=0 DO 20 I=1,N IF (A(I) .LE. MEAN) GOTO 20 NUMBER=NUMBER+1 20 CONTINUE WRITE (2,25) MEAN,NUMBER 25 FORMAT(11H MEAN = ,F10.5,5X,21H NUMBER SUP = ,I5) STOP TypologyEND of programming languages Early Languages 8 / 71 Fortran on Cards Typology of programming languages Early Languages 9 / 71 Fortrans Typology of programming languages Early Languages 10 / 71 Table of Contents 1 Fortran 2 ALGOL 3 COBOL 4 The second wave 5 The finale Typology of programming languages Early Languages 11 / 71 ALGOL, Demon Star, Beta Persei, 26 Persei Typology of programming languages Early Languages 12 / 71 ALGOL 58 Originally, IAL, International Algebraic Language.
    [Show full text]
  • A Politico-Social History of Algolt (With a Chronology in the Form of a Log Book)
    A Politico-Social History of Algolt (With a Chronology in the Form of a Log Book) R. w. BEMER Introduction This is an admittedly fragmentary chronicle of events in the develop­ ment of the algorithmic language ALGOL. Nevertheless, it seems perti­ nent, while we await the advent of a technical and conceptual history, to outline the matrix of forces which shaped that history in a political and social sense. Perhaps the author's role is only that of recorder of visible events, rather than the complex interplay of ideas which have made ALGOL the force it is in the computational world. It is true, as Professor Ershov stated in his review of a draft of the present work, that "the reading of this history, rich in curious details, nevertheless does not enable the beginner to understand why ALGOL, with a history that would seem more disappointing than triumphant, changed the face of current programming". I can only state that the time scale and my own lesser competence do not allow the tracing of conceptual development in requisite detail. Books are sure to follow in this area, particularly one by Knuth. A further defect in the present work is the relatively lesser availability of European input to the log, although I could claim better access than many in the U.S.A. This is regrettable in view of the relatively stronger support given to ALGOL in Europe. Perhaps this calmer acceptance had the effect of reducing the number of significant entries for a log such as this. Following a brief view of the pattern of events come the entries of the chronology, or log, numbered for reference in the text.
    [Show full text]
  • Standards for Computer Aided Manufacturing
    //? VCr ~ / Ct & AFML-TR-77-145 )R^ yc ' )f f.3 Standards for Computer Aided Manufacturing Office of Developmental Automation and Control Technology Institute for Computer Sciences and Technology National Bureau of Standards Washington, D.C. 20234 January 1977 Final Technical Report, March— December 1977 Distribution limited to U.S. Government agencies only; Test and Evaluation Data; Statement applied November 1976. Other requests for this document must be referred to AFML/LTC, Wright-Patterson AFB, Ohio 45433 Manufacturing Technology Division Air Force Materials Laboratory Wright-Patterson Air Force Base, Ohio 45433 . NOTICES When Government drawings, specifications, or other data are used for any purpose other than in connection with a definitely related Government procurement opera- tion, the United States Government thereby incurs no responsibility nor any obligation whatsoever; and the fact that the Government may have formulated, furnished, or in any way supplied the said drawing, specification, or other data, is not to be regarded by implication or otherwise as in any manner licensing the holder or any person or corporation, or conveying any rights or permission to manufacture, use, or sell any patented invention that may in any way be related thereto Copies of this report should not be returned unless return is required by security considerations, contractual obligations, or notice on a specified document This final report was submitted by the National Bureau of Standards under military interdepartmental procurement request FY1457-76 -00369 , "Manufacturing Methods Project on Standards for Computer Aided Manufacturing." This technical report has been reviewed and is approved for publication. FOR THE COMMANDER: DtiWJNlb L.
    [Show full text]
  • Evolution of the Major Programming Languages
    COS 301 Programming Languages Evolution of the Major Programming Languages UMaine School of Computing and Information Science COS 301 - 2018 Topics Zuse’s Plankalkül Minimal Hardware Programming: Pseudocodes The IBM 704 and Fortran Functional Programming: LISP ALGOL 60 COBOL BASIC PL/I APL and SNOBOL SIMULA 67 Orthogonal Design: ALGOL 68 UMaine School of Computing and Information Science COS 301 - 2018 Topics (continued) Some Early Descendants of the ALGOLs Prolog Ada Object-Oriented Programming: Smalltalk Combining Imperative and Object-Oriented Features: C++ Imperative-Based Object-Oriented Language: Java Scripting Languages A C-Based Language for the New Millennium: C# Markup/Programming Hybrid Languages UMaine School of Computing and Information Science COS 301 - 2018 Genealogy of Common Languages UMaine School of Computing and Information Science COS 301 - 2018 Alternate View UMaine School of Computing and Information Science COS 301 - 2018 Zuse’s Plankalkül • Designed in 1945 • For computers based on electromechanical relays • Not published until 1972, implemented in 2000 [Rojas et al.] • Advanced data structures: – Two’s complement integers, floating point with hidden bit, arrays, records – Basic data type: arrays, tuples of arrays • Included algorithms for playing chess • Odd: 2D language • Functions, but no recursion • Loops (“while”) and guarded conditionals [Dijkstra, 1975] UMaine School of Computing and Information Science COS 301 - 2018 Plankalkül Syntax • 3 lines for a statement: – Operation – Subscripts – Types • An assignment
    [Show full text]
  • ALGOL 60 Programming on the Decsystem 10.Pdf
    La Trobe University DEPARTMENT OF MATHEMATICS ALGOL 60 Programming on the DECSystem 10 David Woodhouse Revised, August 1975 MELBOURNE, AUSTRALIA ALGOL 60 Programming on the DECSystem 10 David Woodhouse Revised, August 1975 CE) David Woodhouse National Library of Australia card number and ISBN. ISBN 0 85816 066 8 INTRODUCTION This text is intended as a complete primer on ALGOL 60 programming. It refers specifically to Version 4 of the DECSystem 10 implementation. However, it avoids idiosyncracies as far as possible, and so should be useful in learning the language on other machines. The few features in the DEC ALGOL manual which are not mentioned here should not be needed until the student is sufficiently advanced to be using this text for reference only. Exercises at the end of each chapter illustrate the concepts introduced therein, and full solutions are given. I should like to thank Mrs. K. Martin and Mrs. M. Wallis for their patient and careful typing. D. Woodhouse, February, 1975. CONTENTS Chapter 1 : High-level languages 1 Chapter 2: Languagt! struct.ure c.f ALGOL 6n 3 Chapter 3: Statemp.nts: the se'1tences {'\f the language 11 Chapter 4: 3tandard functions 19 Chapter 5: Input an~ Outp~t 21 Chapter 6: l>rray~ 31 Chapter 7 : For ane! ~hil~ statements 34 Chapter 8: Blocks anr! ',: ock sc rll,~ turr. 38 Chapter 9: PrOCe(:l1-:-~S 42 Chapter 10: Strin2 vp·jaLlps 60 Chapter 11: Own v~rj;lI'.i..es clOd s~itc.hef, 64 Chapter 12: Running ~nd ,;ebllggi"1g 67 Bibliography 70 Solutions to Exercises 71 Appendix 1 : Backus NOlUlaj F\:q'm 86 Appendix 2 : ALGuL-like languages 88 Appenclix 3.
    [Show full text]
  • Trends in Programming Language Design Professor Alfred V
    Trends in Programming Language Design Professor Alfred V. Aho Department of Computer Science Overview Columbia University – The most influential languages Trends in – Trends in language design Programming Language Design – Design issues in the AWK programming language 16 October 2002 1 Al Aho 2 Al Aho The Most Influential Programming The Most Influential Programming Languages of All Time Languages of All Time • Assembler • Fortran – 1950s – 1950s – Step up from machine language – Created by a team led by John Backus of IBM – Available on virtually every machine – Initial focus: scientific computing – Influenced FI, FII, FIV, F77, F90, HPF, F95 3 Al Aho 4 Al Aho The Most Influential Programming The Most Influential Programming Languages of All Time Languages of All Time • Cobol • Lisp – 1950s – 1950s – Created by U.S. DOD – Created by John McCarthy – Grace Murray Hopper influential in initial – Initial focus: symbol processing development – Influenced Scheme, Common Lisp, MacLisp, – Initial focus: business data processing Interlisp – Influenced C68, C74, C85, PL/1 – Dominant language for programming AI applications – The world’s most popular programming language for many years until the early 1990s 5 Al Aho 6 Al Aho The Most Influential Programming The Most Influential Programming Languages of All Time Languages of All Time • Algol 60 • Basic – 1960 – Early 1960s – Algol 60 Report introduced BNF as a notation for – Created by John Kemeny and Thomaz Kurtz of describing the syntax of a language Dartmouth – Initial focus: general purpose programming – Initial focus: a simple, easy-to-use imperative – First block-structured language language – Influenced Algol 68, Pascal, Modula, Modula 2, – Influenced dozens of dialects, most notably Visual Oberon, Modula 3 Basic, probably the world’s most popular – Revised Algol 60 Report: P.
    [Show full text]
  • A View of the Origins and Development of Prolog
    ARTICLES A VIEW OF THE ORIGINS AND DEVELOPMENT OF PROLOG Dealing with failure is easy: Work hard to improve. Success is also easy to handle: You’ve solved the wrong problem. Work hard to improve. (UNIX “fortune” message aptly describing Prolog’s sequential search mechanism in finding all solutions to ,a query) JACQUES COHEN The birth of logic programming can be viewed as the tives of the significant work done in the described confluence of two different research endeavors: one in areas. This review contrasts and complements these artificial or natural language processing, and the other two references by providing the background and moti- in automatic theorem proving. It is fair to say that both vation that led to the development of Prolog as a pro- these endeavors contributed to the genesis of Prolog. gramming language. Alain Colmerauer’s contribution stemmed mainly from The underlying thesis is that even seemingly abstract his interest in language processing, whereas Robert Ko- and original computer languages are discovered rather walski’s originated in his expertise in logic and theorem than invented. This by no means diminishes t:he formi- proving. (See [26] and the following article.) dable feat involved in discovering a language. It is This paper explores the origins of Prolog based on tempting to paraphrase the path to discovery in terms views rising mainly from the language processing per- of Prolog’s own search mechanism: One has to combine spective. With this intent we first describe the related the foresight needed to avoid blind alleys with the aes- research efforts and their significant computer litera- thetic sense required to achieve the simplest and most ture in the mid-1960s.
    [Show full text]
  • An Annotated Bibliography on Software Architecture
    'CGTM 13A Septemb€'r 1972 A~ A~~CTATEr BIELIOGRAPHY MASTER COP~ C~ 50F;WAR£ ~RCHltECTURE ,DO_NOT REMOVE "illiam E. Fiddle Stanford Iin€ar Accelerat6r Center Cowputaticn Group starford, California A1:stract. In the last fivE years research has been actively carried cut in an attempt to find structuring principles for large scftwat€ systems, d~si9n principles and methodologi~s fel such systems, and tecbniqups and mecha~isms for their efficient and economical irrplpmp.ntrttion. 1his interest has been generated by the hope of overcoming the protlEls stemming fre. the in~erent ccmflp.xity of large soft~at:e systems. This report proposes the name "software architecture" for this research area, ;ustifies net using the name "softw~re enginepcing" which i~ currently in vogue, overviews the .-........ content of the area, and presents a keyvorded and annot~t~d hibliography of the literature CD software architectur0. problems and their solution. I. Intro0uction architecture: the art Ot science of building; specif: the art or practice of designing and building structures, esp. habitable structures, in accordance with ~rinciples determined by aesth~tic dnd practical or material consider at ions. We~ster's Third New International Dictionary, Unabridged. "erriam Conrany, Springfield, Mass., 1964 During thE.' threp decade history of digital computers, there has heen a natural and grad ua 1 generalization of the research interests of computpr scientists. Initial software research was directed ~)rimarily toward the deterll'ination of fast, accurate alqorithms for Idlmt"'rical cornputati.on and efficient heuristics for non-numerical I This work was supported ty the Atc~ic Energy Comaission, Ptoject S u- 126P 23.
    [Show full text]
  • International Standard ISO/IEC 14977
    ISO/IEC 14977 : 1996(E) Contents Page Foreword ................................................ iii Introduction .............................................. iv 1Scope:::::::::::::::::::::::::::::::::::::::::::::: 1 2 Normative references :::::::::::::::::::::::::::::::::: 1 3 Definitions :::::::::::::::::::::::::::::::::::::::::: 1 4 The form of each syntactic element of Extended BNF :::::::::: 1 4.1 General........................................... 2 4.2 Syntax............................................ 2 4.3 Syntax-rule........................................ 2 4.4 Definitions-list...................................... 2 4.5 Single-definition . 2 4.6 Syntactic-term...................................... 2 4.7 Syntacticexception.................................. 2 4.8 Syntactic-factor..................................... 2 4.9 Integer............................................ 2 4.10 Syntactic-primary.................................... 2 4.11 Optional-sequence................................... 3 4.12 Repeatedsequence................................... 3 4.13 Grouped sequence . 3 4.14 Meta-identifier...................................... 3 4.15 Meta-identifier-character............................... 3 4.16 Terminal-string...................................... 3 4.17 First-terminal-character................................ 3 4.18 Second-terminal-character . 3 4.19 Special-sequence.................................... 3 4.20 Special-sequence-character............................. 3 4.21 Empty-sequence....................................
    [Show full text]
  • The Algol Family and ML Lisp Algol 60
    CS 242 Language Sequence The Algol Family and ML Lisp Algol 60 Algol 68 John Mitchell Pascal ML Modula Many other languages: Reading: Chapter 5 Algol 58, Algol W, Euclid, EL1, Mesa (PARC), … Modula-2, Oberon, Modula-3 (DEC) Algol 60 Algol 60 Sample Basic Language of 1960 real procedure average(A,n); • Simple imperative language + functions real array A; integer n; no array bounds • Successful syntax, BNF -- used by many successors begin – statement oriented – Begin … End blocks (like C { … } ) real sum; sum := 0; – if … then … else for i = 1 step 1 until n do • Recursive functions and stack storage allocation sum := sum + A[i]; • Fewer ad hoc restrictions than Fortran average := sum/n no ; here – General array references: A[ x + B[3]*y] end; • Type discipline was improved by later languages • Very influential but not widely used in US set procedure return value by assignment Algol oddity Some trouble spots in Algol 60 Question Type discipline improved by later languages • Is x := x equivalent to doing nothing? • parameter types can be array Interesting answer in Algol – no array bounds integer procedure p; • parameter type can be procedure – no argument or return types for procedure parameter begin …. Parameter passing methods p := p • Pass-by-name had various anomalies – “Copy rule” based on substitution, interacts with side effects …. • Pass-by-value expensive for arrays end; • Assignment here is actually a recursive call Some awkward control issues • goto out of block requires memory management 1 Algol 60 Pass-by-name Algol 68 Substitute text of actual parameter Considered difficult to understand • Unpredictable with side effects! • Idiosyncratic terminology Example – types were called “modes” – arrays were called “multiple values” procedure inc2(i, j); • vW grammars instead of BNF integer i, j; – context-sensitive grammar invented by A.
    [Show full text]
  • Algol and Pascal Constructs by R
    g Topic IV g Block-structured procedural languages Chapter 5 of Programming languages: Concepts & Algol and Pascal constructs by R. Sethi (2ND EDITION). Addison-Wesley, 1996. References: Chapter 7 of Understanding programming languages by Chapters 5 and 7, of Concepts in programming M Ben-Ari. Wiley, 1996. languages by J. C. Mitchell. CUP, 2003. Chapters 10(x2) and 11(x1) of Programming languages: Design and implementation (3RD EDITION) by T. W. Pratt and M. V. Zelkowitz. Prentice Hall, 1999. / 1 / 2 /. -, ()Parameters*+ position: There are two concepts that must be clearly distinguished: procedure Proc(First: Integer; Second: Character); A formal parameter is a declaration that appears in the Proc(24,'h'); declaration of the subprogram. (The computation in the In Ada it is possible to use named association in the call: body of the subprogram is written in terms of formal parameters.) Proc(Second => 'h', First => 24); An actual parameter is a value that the calling program ? What about in ML? Can it be simulated? sends to the subprogram. This is commonly used together with default parameters: Example: Named parameter associations. procedure Proc(First: Integer := 0; Second: Character := '*'); Normally the actual parameters in a subprogram call are just Proc(Second => 'o'); listed and the matching with the formal parameters is done by / 3 / 4 Named associations and default parameters are commonly used in /. -, the command languages of operating systems, where each ()Parameter passing*+ command may have dozens of options and normally only a few The way that actual parameters are evaluated and passed to parameters need to be explicitly changed.
    [Show full text]
  • Report on the Algorithmic Language ALGOL 60
    Reprinted from the COMMUNICATIONS OF THE ASSOCIATION FOR COMPUTING MACHINERY Vol. 3, No.5, May 1960 Made in U.S.A. With tYPographical corrections as of June ~8, 1980 Report on the Algorithmic Language ALGOL 60 PETER NAUR (Editor) J. W. BACKUS C. KATZ H. RUTISHAUSER J. H. WEGSTEIN F.L.BAUER J. MCCARTHY K. SAMELSON A. VAN WIJNGAARDEN J. GREEN A. J. PERLIS B. VAUQUOIS M. WOODGER Dedicated to the Memory of WILLIAM TURANSKI INTRODUCTION Background Meanwhile, in the United States, anyone who wished to After the publication of a preliminary report on the suggest changes or corrections to ALGOL was requested to send his comments to the ACM Communications where algorithmic language ALGOL,!' 2 as prepared at a conference in Zurich in 1958, much interest in the ALGOL language they were published. These comments then became the developed. basis of consideration for changes in the ALGOL language. As a result of an informal meeting held at Mainz in Both the SHARE and USE organizations established November 1958, about forty interested persons from ALGOL working groups, and both organizations were several European countries held an ALGOL implementation represented on the ACM Committee on Programming conference in Copenhagen in February 1959. A "hardware Languages. The ACM Committee met in Washington in group" was formed for working cooperatively right down November 1959 and considered all comments on ALGOL to the level of the paper tape code. This conference also that had been sent to the ACM Communications. Also, led to the publication by Regnecentralen, Copenhagen, of seven representatives were selected to attend the January an ALGOL Bulletin, edited by Peter Naur, which served 1960 international conference.
    [Show full text]