shared

Extend the scope of externally created variable or array from inside a subroutine or function.

Syntax;
shared variable
shared array[]

Example:
dim a$
dim b$[10]
sub sharearray
shared a$
shared b$[]
a$="shared"
b$[2]="array shared"
end sub
sharearray
prints(a$)
prints(b$[2])
waitKey

See also common command.