ALGOL Programming Language Poomtri Chungpanich ID 46540324 History

  • Slides: 6
Download presentation
ALGOL Programming Language Poomtri Chungpanich ID 46540324

ALGOL Programming Language Poomtri Chungpanich ID 46540324

History o ALGOL was first designed in late 1950’s o Designed specifically for programming

History o ALGOL was first designed in late 1950’s o Designed specifically for programming scientific o o o computations Designed by an international committee to be a universal language first formalized in a report titled ALGOL 58 then 60 and 68 one of the first attempts to address the issue of software portability The most important language of its era because most of all languages designed since have been referred to as "ALGOL-like“ But never reach the popularity level of FORTRAN and COBOL

Language Features o The 1 st of second-generation programming language n n Block structure

Language Features o The 1 st of second-generation programming language n n Block structure Call by value and call by name If-then-else Recursion o Dynamic Arrays o Reserved Words o User defines data types

Popularity o Used mostly by research computer scientists in the United States and in

Popularity o Used mostly by research computer scientists in the United States and in Europe and not widely used because the lack of I/O facilities o ALGOL 60 did however become the standard for the publication of algorithms and had a profound effect on future language development

Hello World program Hello. World; begin print ‘Hello world’; end; //since ALGOL 60 has

Hello World program Hello. World; begin print ‘Hello world’; end; //since ALGOL 60 has no I/O facilities, this program is using Elliott Algol I/O

Find the highest value procedure Absmax(a) Size: (n, m) Result: (y) Subscripts: (i, k);

Find the highest value procedure Absmax(a) Size: (n, m) Result: (y) Subscripts: (i, k); value n, m; array a; integer n, m, i, k; real y; comment The absolute greatest element of the matrix a, of size n by m is transferred to y, and the subscripts of this element to i and k; begin integer p, q; y : = 0; i : = k : = 1; for p: =1 step 1 until n do for q: =1 step 1 until m do if abs(a[p, q]) > y then begin y : = abs(a[p, q]); i : = p; k : = q end Absmax