
Run-Time Environment 199
Generally for a fully block-structured language, a two-component addressing scheme is used:
( <block lexical level, B>, <occurrence number, N> )
For example, for the function m1, which is nested to a depth of 2, variable ind will be (2, 0) and x
will be (2, 1). Such a two-component addressing is used to locate a variable in the stack as follows:
Local variable: Having B-value equal to current block level, N locations down from the beginning
of the local area.
Global variable: Its B-value must be less than the current block level, if so, the base of the AR can
be found from an appropriate pointer.
For example, if x is ...