Comments
Loading Dream Comments...
You must be logged in to write a comment - Log In
Suppose we have a nested procedure (i.e. one procedure inside another one) :
Foo <:: &{ (a=1, b=1, c=42, Bar) {do something here; Bar ("woo");
Bar <:: &{ (d=2, e=2) { do something else here};
};
Bar can see the base procedure's local variables as "intermediate variables"
because the substruct "(d=2, e=2)" which defines Bar's locals is appended to Foo's locals "(a=1, b=1. c=42, Bar)".
This is like the derived-class inheritance mechanism, whereby a derived class has protected access to its base class fields.
Algol uses a "display list" to implement this (not to be confused with an Atari 800 "display list" which is a set of instructions for its Antic GPU).
Again, if we want to keep certain locals "private" from this mechanism, we prefix their names by "£", for example
"(a=1, £b=1, c=42, Bar)".