Nested Procedures[adapted from slide by John Werth.]
Scope is the region of program text over which a symbol can be referenced. In most languages, the scope of a variable is determined by syntax, e.g. a variable can be used only inside the procedure that defines it. This notion of scope is reflected in the symbol table, which is called lexical scoping. With lexical scoping, a name is defined when it can be looked up in the lexicon (symbol table) at the point of use.
Some languages (Algol, Pascal, PL/I) have allowed procedures to be nested inside other procedures; however, this has a high cost and only slight benefit.