[AccessD] Public Variables - Scope and Lifetime

Stuart McLachlan stuart at lexacorp.com.pg
Sat Nov 26 18:47:58 CST 2005


On 26 Nov 2005 at 16:46, Arthur Fuller wrote:

> Your reply made me decide to test static functions against a STOP, which I
> have never done before.
> Turns out that static values are preserved despite a STOP. Code follows. 

No different to a global variable, this works the same way:

Function TestGlobal() As Long
gstrTest = "This is a test"
 MsgBox gstrTest
Stop
MsgBox gstrTest
End Function

-- 
Stuart





More information about the AccessD mailing list