Algol 60 Standards:

Revised Report (really it is the initial standard)

algol 60 revised report

Modified Report ( with addition of new functions )

algol 60 modified report Algol with these additions is much better.

Extended Report Proposal for Algol 60 Extended (in development...):

In 2015 we have 55 years of Algol 60. This Language is very good, especially in two areas:

  • teaching of programming - because of its clearness and simplicity. It is ideal first programming language for studying.
  • algorithm description - for different algorithms development and their publication

Why level of Algol60 using is low right now? It is a result of IBM efforts in 1960s-1970s and "activity" of Algol68 committee. IBM specially don't develop Algol 60 compilers because they were afraid it will be competitor-"killer" of FORTRAN language. About Algol68 committie ... Is's very sad story of killing of Algol60 as a competitor of looser monster language Algol68.

After its birth Algol 60 practically was not developed. Only Modified Report was proposed (1972), where they defined simple I/O procedures and some additioonal procedures (fault and stop).

Of course, Algol 60 needs extensions. However, they must be in the initial scope of Algol ideas. Do not do a new language, but extend the language without adding new concepts (for example no references, no structures). Extensions have to save the Algol main concept: it is a language for algorithm development with a minimal Input/Output library.

At the times of Algol 60 creation practically all algorithms were for floating point numbers processing and some for signed integer processing. In processing they used arithmetic oerations and comparisons. Bit processing and text string processing were very seldom.

But after 60 years of computer use in algorithm development / implementation it was found that new data types are very important not only for algorithms which processed real (floating) numbers, but also for algorithms which process byte numbers (image and video processing, text processing), short integer (2 byte) numbers (sound processing, text processing), and long integer ( 8 bytes long) ( theory of numbers and cryptography).

What about data structures and pointers? They are so strong addition to language, they change language so hard, that it is not good to add them to Algol. If somebody needs in them, there is C language or Free Pascal language for that.

First step:

Minimum we need in three new data types in addition to existing three. For these new proposed data types can be used such Notation:

  • character - for signed byte integer data type
  • ucharacter - for unsigned byte integer data type
  • uinteger - for unsigned short integer

Assignment operator make automatical transformation of any integer to any other integer.

For these data types we need Input/Output functions like in the Modified Report. Here they are:

  • incharacter(channel, value) - input number
  • outcharacter(channel, value) - output number
  • inucharacter(channel, value) - input number in text form
  • outucharacter(channel, value) - output number in text form
  • inuchar(channel, value) - input as a separate character
  • outuchar(channel, value) - output as a separate character
  • inuinteger(channel, value) - input number in text form
  • outuinteger(channel, value) - output number in text form

For unsigned integer types of data there are very important bit operations (shifts and logical operations). We can select such set of operations:

  • !! - bit NOT
  • && - bit AND
  • || - bit OR
  • ^^ - bit XOR
  • << - shift left (like in C)
  • >> - shift right
  • >>> - arithmetic shift right for signed integers
In C language vice versa : bit operation uses one symbol, logical uses two symbols.

Add functions for working with binary files:

  • bincharacter(channel, value) - input number in bynary form
  • boutcharacter(channel, value) - output number in bynary form
  • binucharacter(channel, value) - input number in bynary form
  • boutucharacter(channel, value) - output number in bynary form
  • bininteger(channel, value) - input number in bynary form
  • boutinteger(channel, value) - output number in bynary form
  • binuinteger(channel, value) - input number in bynary form
  • boutuinteger(channel, value) - output number in bynary form

Second step:

Add operators "while ... do", "break", "continue"

Add new statement "include filename" to include text from filename to any place of Algol program before compilation

Short notation for "comment" keyword - symbol '!'

Short notation for "begin" keyword - symbol '{'

Short notation for "end" keyword - symbol '}'

Support assignment of string constants to one-dimensional array

Make array dynamical allocation by declaration of arrays in any place of program. Add statement "freearray"

Operation %% ( or \ ) - residual of integer division

We also need in some new functions in the standard Algol library

  • lengtharr(arr, n) - return length of n-th dimension of array arr
  • arcsin(x) and arccos(x)
  • ellipt(x,k) - elliptic integral function (integral of 1/sqrt((1-x*x)(1-k*x*x)))
  • amplit(y, k) - reverse elliptic integral function
  • sort(a,n) - sort array a of n dimension
  • randint(a,b) - random integer number between a and b
  • randreal - random real number between 0 and 1.0
  • randseed(n) - initialization of random number generator
  • clocks - reading of processor clocks
  • clocksinsec - number of clocks in one second
  • outdate(channel) - print of current date in standard text form
  • outtime(channel) - print of current time in standard text form
  • system(stringconstant) - run a program

Third step:

In addition it will be useful to have:

  • shortint - for signed short integer
  • ushortint - for unsigned short integer
  • longint - for long signed 8-bytes integer
  • ulongint - for long unsigned 8-bytes integer
  • hugeint - for huge signed integers (16 bytes integer)
  • uhugeint - for huge unsigned integers (16 bytes integer)

Add I/O functions for these data types

It will also be useful to have:

  • shortreal - 4 bytes real number
  • longreal - 10 bytes real number
  • hugereal - 16 bytes real number

Add functions for open/ close files - open(channel,filename) and close(channel)

Add opportunity to call C-function from standard C runtime libraries by preliminary declaration of them as "external procedure"

Fourth step:

Functions for graphic output to windows:

  • handle := winopen(name, xleft, ytop, xsize, ysize, borderstyle)
  • winpixel(handle, x, y, r, g, b) - draw a pixel with r,g,b color
  • winlineseg(handle, x1, y1, x2, y2, r, g, b) - draw a line segment with r,g,b color
  • wincircle(handle, x, y, radius, r, g, b) - draw a circle
  • winclean(handle) - clean up the window
  • winclose(handle) - close the window

Programmer can use these functions for graph plotting and image showing.

Firth step:

In development ...

Processing interrupts from timer, keyboard, mouse, USB, ethernet. Introduce procedures GetInterrupt, WaitInterrupt

Add procedures:

  • sleep(nOfClocks) - sleeping of program for nOfClocks clocks
  • thread(priority, proc) - run of light-weighted thread

For synchronization of access to common resources from different threads use "monolithic" operators. If before operator programmer includes "monolithic" keyword, all other threads of process will wait until this operator will be executed.

For syncronization of different threads activities use triple (event-signal-wait)

Sixth step:

In development ...

Introduce vector and 2-dim matrices operations. Its add a lot of power ( like Matlab power)

Every numeric one dimensional array can be considered as a vector. If vectors have the same dimensions, There are possible operations:

  • assignment of one vector to another: b := a; meand b[i] := a[i]; for all i
  • addition/subtraction of two vectors c := a + b; means c[i] := a[i]+b[i]; for all i
  • component multiplication of two vectors : c := a * b ; means c[i] := a[i] * b[i]; for all i
  • component division of two vectors : c := a / b ; means c[i] := a[i] / b[i];

It is also possible consider operations of adding/multiplication vector with number r:

b:=a+r ; and b:= a*r;

Usually one-dimensional array treated as a raw vector, but a' is treated as a column vector. It is a transposition operation. Using it there are possible introduce two additional operations:

  • scalar multiplication of two vectors r := a * b' ; where r is sum of a[i]*b[i]
  • matrix multiplication of two vectors m := a' * b ; where m[i,j] := a[i]*b[j];

Last important operation with vector is subvector selection "::".

example: b[1::4] := a[5::8];

Similar set of operations can be introduced for two-dimensional matrices, follow the linear algebra rules.

In standard extension should be present list of compilation error messages with description of possible situations, when these errors are happen. Any Algol compiler must support this diagnostic.

That is it!

It makes Algol be modern and very poweful language, which is the best for many different tasks.