| Home | Previous Lesson: Scoping Variables Next Lesson: Global Variables |
Do you know what type of variables we were using till now? Right!, Local Variables. Local variables are declared in the script itself and they are available only in the script where they were declared. This variable can't be referred in any other events or functions. For example, if you declare a variable in the Clicked event of a CommandButton, they are available only in that event. It is not available even if you try to access that variable, say, from rButtonDown event of the same object. Local variable comes into existence only when the script for the event/ function starts executing and is destroyed upon the completion of the script.
| Home | Previous Lesson: Scoping Variables Next Lesson: Global Variables |