content_image/740588.jpg
## O.D. Scope 

Each procedure and function declaration has a structure similar to a program; i.e. , each consists of a heading and a block. Hence, procedure and function declarations may be nested within other procedures or functions. Labels, constant synonyms, type, variable, procedure, and function declarations are local to the procedure or function in which they are declared. That is, their identifiers have significance only within the program text that constitutes the block. This region of program text is called the scope of these identifiers. Since blocks may be nested, so may scopes. Objects that are declared in the main program, i.e., not local to some procedure or function, are called glohal and have significance throughout the entire program. 

Since blocks may be nested within other blocks by procedure and function declarations, one is able to assign a level of nesting to each. If the outermost program-defined block (e.g., the main program) is called level 0, then a block defined within this block would be of level I; in general, a block defined in level I would be of level (i+ I). Figure O.c illustrates a block structure. 

<img src='content_image/740588.jpg'>

