Static Statement [Runtime]/text/sbasic/shared/03103500.xhpSun Microsystems, Inc.converted from old format - fpeStatic statementStatic Statement [Runtime]Declares a variable or an array at the procedure level within a subroutine or a function, so that the values of the variable or the array are retained after exiting the subroutine or function. Dim statement conventions are also valid.The Static statement cannot be used to define variable arrays. Arrays must be specified according to a fixed size.Syntax:Static VarName[(start To end)] [As VarType], VarName2[(start To end)] [As VarType], ...Example:Sub ExampleStaticStatic iInit As Integerif iInit = 0 then iInit = InitVar() REM Test if variable is already initializediInit = iInit + 1MsgBox iInit,0,"The answer is"End SubREM Function for initialization of the static variableFunction InitVar() As IntegerInitVar = 40 REM any value for initializationEnd Function