The default layout in the Application, Window, and User Object painters includes a Script view set up to declare variables. Keeping a separate Script view open makes it easy to declare any variables or external functions you need to use in your code without closing and compiling the script.
To declare variables and external functions:
Select [Declare] from the first list in the Script view.
Select the variable type (instance, shared, or global) or the function type (local or global) from the second list.
Type the declaration in the Script view.
For more information about declaring variables, see the PowerScript Reference. For more information about declaring and using external functions, see the PowerScript Reference and Application Techniques.