Algol 68 supports prefix and infix operators defined by the programmer. I record here how the programmer defines their meaning. At a code site where the operator is used it is first determined which tokens are operators without regard to declarations. Certain combinations of one of more special symbols are deemed operators. This includes +, -, * etc. ‘Strophed’ symbols except for reserved words are also in this category. Strophed meant upper case for most compilers; few machines dealt with lower case letters when Algol 68 was first designed but they were common by the time the language came into use. Once a token is identified as an operator it is required that it be in the lexical scope of a priority declaration: “PRIO + = 3”. The conventional operators are equipped with such invisible honorary primordial declarations. With the precedence of all operators known the compiler determines the types of their operands. Certain coercions of the operands are performed such as dereferencing and deproceduring. Next it is necessary for the site to appear the lexical scope of some definition of a function bound to that operator with operand types matching the types found at the site. Thus operators can be overloaded. The common operators are indeed primordially equipped with the conventional overloading rather like Fortran of Algol 60.
A declaration that binds a function to an operator must itself be in the scope of a “PRIO” declaration for that operator. One such primordial declaration is “OP +:= = (REF INT x, INT y)INT: x := x+y”. The text beyond the “=” is a typed lambda expression. The meaning given here to “+:=” is just the meaning already available in the primordial environment.
Some compilers (such as from Cambridge) provide a bonus definition such as the one for “+:=” above for every operator “+” defined by the programmer. This saves many one-liners.