SUB - see CALL

Local Variables
The variable names inside a subroutine are scoped locally, meaning that the value of any variable inside a subroutine is different from the value of a variable of the same name outside the subroutine. 

Passing by Reference
Variables passed as arguments into subroutines are passed "by value" which means that a copy of the variable is passed into the subroutine.  The value of the variable is not changed in the main program if it is changed in the subroutine.  A variable may instead by passed "byref" which means that a reference to the actual variable is passed and a change in the value of this variable in the subroutine affects the value of the variable in the main program.

Global Variables and Devices
Variables declared with the GLOBAL statement are available in the main program and in subroutines and functions.

Arrays, structs and handles of files, DLLs and windows are global to a Just BASIC program, and visible inside a subroutine without needing to be passed in. 

Special global status is given to certain default variables used for sizing, positioning, and coloring windows and controls.  These include variables WindowWidth, WindowHeight, UpperLeftX, UpperLeftY, ForegroundColor$, BackgroundColor$, ListboxColor$, TextboxColor$, ComboboxColor$, TexteditorColor$.  The value of these variables, as well as DefaultDir$ and com can be seen and modified in any subroutine/function.