off-side rule


off-side rule

A lexical convention due to Landin, allowing the scope ofdeclarations in a program to be expressed by indentation. Anynon-whitespace token to the left of the first such token onthe previous line is taken to be the start of a newdeclaration. Used in, for example, Miranda and Haskell.

[P.J. Landin "The Next 700 Programming Languages", CACM vol 9pp157-165, March 1966]