| **Navigation:**  [[introduction.htm|Language Reference]] > 3 - Variable Declarations > Data Declarations and Memory Allocation >====== Scope of variables and type declarations ====== | [[global local static and dynamic.htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[data declaration sections.htm|{{btn_next_n.gif|Next page}}]] | | || This topic describes the scope of variables and type declarations. Type Declaration Scope is shown as follows: **GLOBAL > MODULE > PROCEDURE** **PROCEDURE > Procedure ROUTINE** **PROCEDURE > CLASS > METHOD > Method ROUTINE** Referring to the illustration above: Anything from a PROCEDURE section can reference anything from the MODULE or GLOBAL sections. Anything from the MODULE section can reference anything from the GLOBAL section. Referencing in the other direction is not permitted.. In our illustration above the scope of a TYPE declaration moves from left to right. Anything declared on the left can be used on any right scope AND anything declared on the right levels are not accessible to any level that is on the left side. A procedure needs to be added to the MAP inside a named MODULE to be accessible to others MEMBERs. If a procedure or type is declared in a MEMEBER local MAP, it can be added and EXPORTED except it it has the PRIVATE attribute applied. **See Also: **[[global local static and dynamic.htm|Global, Local, Static, and Dynamic]] [[private set procedure private to a class or module .htm|PRIVATE (set variable or procedure private to a CLASS module)]]