programming language : algol

11
Programming Language : Algol Name: Nath Prakobkosol ID: 48540462

Upload: mufutau-reeves

Post on 30-Dec-2015

35 views

Category:

Documents


6 download

DESCRIPTION

Programming Language : Algol. Name: Nath Prakobkosol ID: 48540462. When it was first designed?. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Programming Language : Algol

Programming Language :Algol

Name: Nath PrakobkosolID: 48540462

Page 2: Programming Language : Algol

Nath Prakobkosol 48540462 2

When it was first designed?

ALGOL (ALGOrithmic Language) is one of several high level languages designed specifically for programming scientific computations. It started out in the late 1950's, first formalized in a report titled ALGOL 58, and then progressed through reports ALGOL 60, and ALGOL 68.

Page 3: Programming Language : Algol

Nath Prakobkosol 48540462 3

Goal & Purpose

It was designed to avoid some of the perceived problems with FORTRAN and eventually gave rise to many other programming languages (including Pascal).

Page 4: Programming Language : Algol

Nath Prakobkosol 48540462 4

Who designed this language?

ALGOL was developed jointly by a committee of European and American computer scientists.

Page 5: Programming Language : Algol

Nath Prakobkosol 48540462 5

Features

• ALGOL 60 allowed for two evaluation strategies for parameter passing: the common call-by-value, and call-by-name. Call-by-name had certain limitations in contrast to call-by-reference, making it an undesirable feature in language design. For example, it is impossible in ALGOL 60 to develop a procedure that will swap the values of two parameters if the actual parameters that are passed in are an integer variable and an array that is indexed by that same integer variable. However, call-by-name is still beloved of ALGOL implementors for the interesting "thunks" that are used to implement it.

Page 6: Programming Language : Algol

Nath Prakobkosol 48540462 6

Contribution

ALGOL is the first language that use begin end for delimiting them.

ALGOL was use many type of syntax so it has many syntax for next language to implement.

Page 7: Programming Language : Algol

Nath Prakobkosol 48540462 7

Envisioned Users

• Research computer scientists

• Regular programmer

Page 8: Programming Language : Algol

Nath Prakobkosol 48540462 8

How successful ?

ALGOL was used mostly by research computer scientists in the United States and in Europe. Its use in commercial applications was hindered by the absence of standard input/output facilities in its description and the lack of interest in the language by large computer vendors.

Page 9: Programming Language : Algol

Nath Prakobkosol 48540462 9

Example• Computing Illustrate ( Compute The Mean ):

// the main program (this is a comment)

begininteger N; Read Int(N);

begin real array Data[1:N]; real sum, avg; integer i; sum:=0; for i:=1 step 1 until N do

begin real val; Read Real(val); Data[i]:=if val<0 then -val else val

end;

for i:=1 step 1 until N do sum:=sum + Data[i];

avg:=sum/N; Print Real(avg)

end end

Page 10: Programming Language : Algol

Nath Prakobkosol 48540462 10

Example (cont)

• I/O Illustrate: because ALGOL had no IO facilities. The following code

could run on an ALGOL implementation for a Burroughs A-Series mainframe.

BEGIN

FILE F (KIND=REMOTE);

EBCDIC ARRAY E [0:11];

REPLACE E BY "HELLO WORLD!";

WHILE TRUE DO

BEGIN

WRITE (F, *, E);

END;

END.

Page 11: Programming Language : Algol

Nath Prakobkosol 48540462 11

Reference

• http://www.engin.umd.umich.edu/CIS/course.des/cis400/algol/algol.html

• http://www.dmoz.org/Computers/Programming/Languages/Algol_68/