'' 全局变量,可见的主要部分和程序
dim shared global as integer
sub foo( number as integer, text as string )
'' 局部变量只在本程序可见
dim a as integer
a = global * 3 + number / 2
print a, text
global = 555
end sub
'' 仅对FB程序的主要部分可见的局部变量
dim a as integer
dim s as string
a = 5
a = a * 2
s = "hello"
s += ", there!"
print a, s
global = 100
print "global: "; global
foo( a, s )
print "global: "; global
sleep