This preview shows page 1. Sign up to view the full content.
Unformatted text preview: was the most widely used version of the language. The latest and the
most powerful version of the language is ALGOL 68 that was released in 1968.
Scientific applications being the main area of use, ALGOL was designed as an
extension of FORTRAN. That is. it generalized many of FORTRAN'S features
and added several new constructs and concepts to make the language more flexible
and powerful. Some of the main features of ALGOL are as follows: 1. It allows variable names to be of any length, as opposed to then FORTRAN'S
restriction to six characters.
It allows arrays to have any number of dimensions, as opposed to then
FORTRAN'S limitation to no more than three.
It allows programmers to specify the lower bound of arrays, whereas in
FORTRAN it was implicitly.
4. It supports nested IF statements, which was not the case in FORTRAN.
5. It has a "for" statement to do what FORTRAN'S "DO" statement does, but
then it also has a "do statement to allow a sort of subprogram process, complete
6. It formalized the concept of data type.
It added the idea of compound statements, which are program statements
composed of multiple simple statements.
8. It introduced the concept of block structure. This allowed the programmer to
localize parts of programs by introducing new data environments, or scopes. For
example, in the following code segment
integer total, index;
the begin-end pair forms a block in which the variables total and index are local
variables. They are not visible, nor do they have storage associated with them
when control is outside the block.
9. It allows semi-dynamic arrays for which the subscript range or ranges are
specified by variables, so that the size of the array is set at the time storage is
allocated to the array which happens when the declaration is reached during
execution. For example, the following code segment illustrates the use of this
procedure addelement (listlen, newelement);
View Full Document
This document was uploaded on 04/07/2014.
- Spring '14