# Units

The aim of this chapter is to describe the grammar of units in a fairly rigorous manner. The chapter covers units, contexts and coercions, as well as a number of lesser, but still important, ideas such as casts and balancing. In describing some of the grammatical aspects of the language in previous chapters, it has been necessary to gloss over or distort some of the facts. The definitive truth about such matters is in this chapter.

An Algol 68 program consists of a closed `VOID` clause which means that any value yielded by the closed clause will be voided. Any closed clause can be used including conditional and loop clauses. It is unusual to write a program which starts other than with `BEGIN` (and ends other than with `END`), but there is nothing in the definition of the language to preclude it. On our round tour of units, we shall start at the bottom and work up.

Subsections

- Phrases
- Contexts
- Coercions
  - Deproceduring
  - Dereferencing
  - Weakly-dereferencing
  - Uniting
  - Widening
  - Rowing
  - Voiding
  - Legal coercions
  - Exercises
- Enclosed clauses
  - Exercises
- Primaries
  - Exercises
- Secondaries
  - Exercises
- Tertiaries
- Quaternaries
  - Exercises
- Balancing
  - Exercises
- Well-formed modes
  - Determination of well-formedness
  - Exercises
- Flexible names
- Orthogonality
- Summary