Algol 60 Lego Pieces:

Using these you can build complicated programs.

Integer Numbers

integer0.a60 Read integer and print it

integer1.a60 Integer overflow investigation

integer2.a60 Subtraction overflow

integer3.a60 Integer multiplication

integer4.a60 Integer division

integer5.a60 Integer second division

integer6.a60 Bit presentation of integer from left to right

integer7.a60 memory size experimental estimation

integer8.a60 real to integer transform

integer9.a60 library function maxint

Real Numbers

real0.a60 standard notation

real1.a60 scientific notation

real2.a60 read and print

real3.a60 for experiments to find max real, epsilon, min positive real

real4.a60 maxreal

real5.a60 minreal = real most close to 0

real6.a60 epsilon = difference of 1 and real most close to 1

real7.a60 real addition

real8.a60 real multiplication

real9.a60 real division

real10.a60 real power of real

real11.a60 real arithmetics sometimes is not associative

Booleans

boolean0.a60 print boolean

boolean1.a60 procedure outboolean

boolean2.a60 integer equality comparison

boolean3.a60 integer more/less comparison

boolean4.a60 real numbers comparison

boolean5.a60 negation operation

boolean6.a60 conjugation (and &) operation

boolean7.a60 disjunction (or) operation

boolean8.a60 conditional operation ->

boolean9.a60 biconditional operation ==

Arrays

array0.a60 integer 1-dim array (square root table)

array1.a60 Pascal Triangle array

array2.a60 real array with square roots

array3.a60 2-dim array: function z = x*y in rectangle (0-1,0-1

array4.a60 dynamical array allocation

array5.a60 array allocation of maximal size

Operator if

if0.a60 print result of integer numbers comparison

if1.a60 print result of real numbers comparison

if2.a60 organize loop with integer counter and goto statement

if3.a60 do-while loop

if4.a60 organize while loop: if and goto statement

if5.a60 Nested if-s

if6.a60 arithmetic expression with if inside

Operator for

for0.a60 Print first 20 integers

for1.a60 Divisors of integers

for2.a60 Sum of first n integers

for3.a60 Operator for with set of non counting parameters

for4.a60 for with real counter (21 numbers between 0 and 1)

for5.a60 integral of 1/(1-x*x) from 0 to 1;

Blocks and variable Scopes

block0.a60 block inside main block

block1.a60 variable visibility in different blocks

block2.a60 label visibility in different blocks

block3.a60 own qualifier in inner blocks

block4.a60 dynamic memory allocation in inner block

Procedures

procedure0.a60 typeless procedure without arguments

procedure1.a60 typeless procedure with argument

procedure2.a60 integer procedure without arguments

procedure3.a60 integer procedure with arguments

procedure4.a60 real procedure without arguments

procedure5.a60 real procedure with arguments

procedure6.a60 passing parameter by value

procedure7.a60 passing parameter by name (by reference)

procedure8.a60 swap procedure

procedure9.a60 visibility of outside variables from procedure body

procedure10.a60 procedure defined outside of main block

procedure11.a60 recursive procedure (factorial calculation)

procedure12.a60 qualifier own in procedure

procedure13.a60 pass procedure name as argument to another procedure

File Input and Output

inout0.a60 create file and save N integer numbers in it

inout1.a60 read file with N integer numbers

inout2.a60 create file and save N real numbers in it

inout3.a60 read file with N real numbers

inout4.a60 create file and save real square matrix in it

inout5.a60 read square matrix from file

inout6.a60 create file with mix of integer and real numbers

inout7.a60 read file with mix of integer and real numbers

inout8.a60 file creation with output of strings

Standard Mathematical Library

mathlib0.a60 sign function

mathlib1.a60 abs function

mathlib2.a60 sqrt function

mathlib3.a60 exponential function

mathlib4.a60 logarithmic function

mathlib5.a60 sine function

mathlib6.a60 cosine function

mathlib7.a60 arctan function

System Library

system0.a60 stop procedure

system1.a60 in development ...!!!!

system2.a60 MARST: function inline for C code

system3.a60 real procedure cputime

system4.a60 MARST example of using inline procedure

Polynomials

poly0.a60 real roots of square polynomial

poly1.a60 fast calculation of cubic polynomial

poly2.a60 real root of cubic polynomial

poly3.a60 division of cubic polynomial

poly4.a60 multiplication of two square polynomials

Vectors

vector0.a60 vector generation

vector1.a60 procedure outVector of writing vector to a file

vector2.a60 procedure inVector of reading vector from a file

vector3.a60 norm of vector

vector4.a60 vector scalar multiplication

vector5.a60 cosine of angle between vectors

vector6.a60 random vector generation

vector7.a60 bubble sort of vector components

Matrices

matrix0.a60 matrix writing to a file

matrix1.a60 special matrices generation

matrix2.a60 matrix reading from a file

matrix3.a60 matrix and number addition and multiplication

matrix4.a60 matrix addition

matrix5.a60 matrix and vector multiplication

matrix6.a60 matrix copying

matrix7.a60 random matrix generation

matrix8.a60 2x2 linear system solution

matrix9.a60 matrix transposition

matrix10.a60 matrix2x2 and 3x3 determinants

Statistics

stat0.a60 average of 1-dim array

stat1.a60 average and standard deviation

stat2.a60 median of data vector

stat3.a60 correlation between two vectors

stat4.a60 histogram of numbers from random generator