Scope of Names
In Modula-2 and Ada95 programs, and in most other programminglanguages, the interpretation of a name depends on where it is used in a program. The part of a program in which a name is valid is called the scope of the name.
The debugger uses the scope of names to interpret the names correctlywhile debugging. In this case, the scope is determined by where the programis in its execution. Names are interpreted according to the scope of the currentlocation.
For example, suppose you have two procedures, Alpha and Beta,both of which declare a variable called Value. Depending on where you are inthe execution of the program, different things might happen when you try to examineValue:
When searching for a name, the debugger looks in two places:first, the currently executing procedure, and then, if not found there, in the modulethat contains the currently executing procedure.
You can also refer to names globally declared in a Modula-2 modulesand Ada95 packages by qualifying the name with the module or package name, as follows:
Expressions are used for many purposes in debugging:
The debugger distinguishes between two types of expressions: