In This Book

run relative

The notation is `run(n) where n is the number

 

of the frame counting from the most recent frame

 

in the program (that is, the location where the

 

program is stopped). In Figure 7-3. the frame

 

with print_answer is `run(2) . `run by itself

 

refers to the location where the program is

 

stopp ed.

environment relative

The notation is `env(- n) where n counts up

 

(toward `main) from the current environment.

 

The notation is `env(+ n) where n counts down

 

(toward `run) from the current environment.

 

`env by itself refers to the current environment.

In Figure 7-3, you can refer to the instances of variable HI as `run(3)\HI , `run(4)\HI , and `run(5)\HI . You could also refer to the variables with `main or `env notation. A frame quali￿ed name may not contain blo ck quali￿ers (that is, `main\blk is not valid).

Also, you can use frame names with the environment command to change your environment to any procedure on the call/return stack. For example, you can set the environment to the current point of execution using:

environment `run

7-12 Identifying Program Objects