As far as "file scope" if you 'Dim' a var at the beginning of a script "A" and call that script from script "B". Script "B" will not be able to see those script "A" vars because they are out of scope. Richard, is this type of action what you defined as "file scope"?
Test script for scopiing. Execute test.kic which calls test2.kix.
Code:
Break on
Global $TestA
$TestA="a"
Dim $TestE
$TestE = "e"
Call "test2.kix"
? "in test TestA ="+$TestA
? "in test Test2B="+$Test2B
? "in test Test2C="+$Test2C
? "in test Test2D="+$Test2D
? "in test TestE ="+$TestE
Code:
Break ON
Dim $Test2B
$Test2B = "b"
Global $Test2D
$Test2D = 2
if $Test2B="b"
Dim $Test2C
$Test2C="c"
endif
? "in test2 TestA ="+$TestA
? "in test2 Test2B="+$Test2B
? "in test2 Test2C="+$Test2C
? "in test2 Test2D="+$Test2D
? "in test2 TestE ="+$TestE
?