Changes between Version 2 and Version 3 of Fundamentals


Ignore:
Timestamp:
05/12/23 19:57:48 (3 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Fundamentals

    v2 v3  
    1818To understand the static and dynamic nature of scopes and processes, and the relations between them, we consider the (artificial) example code below. The static scopes in the scope are numbered from 0 to 6.
    1919
    20 
     20[[Image(picture.gif)]]
    2121
    2222The static scopes have a tree structure: one scope is a child of another if the first is immediately contained in the second. Scope 0, which is the file scope (or root scope) is the root of this tree. The static scope tree is depicted in Figure 5.2 (left). Each scope is identified by its integer ID. Additionally, if the scope happens to be the scope of a function definition, the name of the function is included in this identifier. A node in this tree also shows the variables and functions declared in the scope. For brevity, we omit the proc variables.