Here is a program written to explore some tensor calculations. This particular note is a just in time description of just enough Algol 68 features to understand and perhaps modify the program. Here is a note on the math of the program.

MODE V = [3]REAL; introduces the type V which is an array of three floating point numbers—a vector in this application. REAL is like C’s float.
MODE TEN = [3,3]REAL; introduces TEN as the type of a 3 by 3 array which is always a tensor in this program.
Names of types are all upper case in Algol 68.
The next three lines define tv which is a procedure that takes a TEN array and returns a V vector. Given a 3D anti-symmetric tensor it returns the unique 3D axial vector that codes for that tensor. This works only in 3D. The argument types and return type is conveyed by (TEN t)V. This procedure also complains if the input array is not anti-symmetric when viewed as a matrix. (test|action) is like C’s if (test){action;}. Note that as commas separate arguments in C, there are one fewer commas than arguments: atan(1, 2). Similarly in Algol semicolons separate statements and correspondingly the last statement in a clause is not followed by a semicolon.
a NE b is like C’s a != b.
FOR j TO 3 DO stuff OD; is like C’s for(j=1; j<=3; ++j) stuff;.
When the Algol engine sees (t[2,3], t[3,1], t[1,2]) it is already expecting a vector because that is what the procedure is supposed to return. It returns a vector with these three components.
Spaces in identifiers are allowed as in next random.
pv just prints a vector V.
REAL s:=0 in the definition of ip introduces a variable which can be assigned to. It defines and initializes s which will accumulate the products that sum to the inner product between two vectors which are arguments to ip. Algol’s := is like C’s = and Algol’s = is like C’s ==.
[20]V ma defines a mutable array called ma of 20 vectors. They are uninitialized until the next line.
Note that calls on procedures with no arguments, such as rx here, omit the empty parenthesis that C requires.

In the definition of the procedure sum the parameter pr has type PROC (INT)REAL which declares pr to be a procedure. When sum is called pr must be supplied as a procedure that accepts an integer and returns a float. The Pound sign “#” surrounds comments in Algol68. Skipping ahead we see sum invoked with the value of (INT k)REAL: ma[19][k] as the argument. This expression evaluates to an anonymous procedure which takes an INT value k and returns a float value ma[19][k]. It is formally like a lambda expression which produces a function.

For variations on conditional expressions, such as (i<j|rx|:i=j|0|-omet[j,i]) see the table in this page.

In the definition of v note the construct sum((INT q)REAL: xxx ) which performs much as “Σq xxx” with q running from 1 to 3. In either case q may appear freely in xxx.

UPB ma means the upper bound of the array ma. Algol has a proper concept of array and when an array value, such as ma is made available the array size is likewise available.
The expression beginning (0=0| provides two equivalent ways computing an inner product of two vectors. Since 0=0 is true the program uses the first. If you change it to 0=1 the program will use the second. Recall that the routine ip requires two vectors as arguments. omet[,i] and ma[k][] each have one empty index position. In each case a vector is formed and passed as the argument. The elements of the passed vector are as selected by the index values that would be valid in the empty positions.

PRIO X = 5 heralds a definition of a new infix operator X. It says that its precedence will be 5 but that is irrelevant in this particular program. The meaning of X is provided much like a procedure definition but beginning OP X = (V a, b)V:. Here X is the vector cross product. The same goes for defining the + operator between two vectors. The precedence for + is already known however.

Note that (v=k|1|0) serves as δvk or the traditional Kronecker delta. Note it2[i,,j,] in the last line. There are two empty index positions and a two dimensional array is thus supplied to the procedure pnt.