How Declaring a Variable Affects Variable Scope

The following table describes how you declare a variable affects variable scope.

Scope Where the Variable Is Declared

Local

Declared in a subroutine or function. Only the subroutine or function that declares the variable can access this local variable.

Module

Declared in the general declarations section. Any subroutine, function, or event that is attached to the object in the script window that displays this variable can access this modular variable.

Global

Declared in one of the following items:

  • Application_Start event

  • Application.PreInvokeMethod method

You can write code that accesses a global variable throughout the Siebel application. For more information, see Siebel Technical Note #217 on My Oracle Support.