next up previous index
Next: Recursion Up: Procedures Previous: RESULT

Locals

    Besides formals, a procedure can also declare local variables, that are created on procedure entry, initialized with VOID, and discarded on procedure exit. Similarly to other block-structured languages, a local variable can override temporarily a more global identifier (procedure or variable). From within a procedure with a variable name N, all accesses to N will refer to the variable, even if there is a N procedure or variable defined globally.