LibreOffice 24.8 Help
āĻāĻāĻāĻŋ āĻ¸āĻžāĻŦāĻ°ā§āĻāĻŋāĻ¨ āĻ āĻĨāĻŦāĻž āĻĢāĻžāĻāĻļāĻ¨ā§āĻ° āĻŽāĻ§ā§āĻ¯ā§ āĻŦāĻŋāĻĻā§āĻ¯āĻŽāĻžāĻ¨ āĻĒā§āĻ°āĻ¸āĻŋāĻāĻžāĻ°ā§ āĻāĻāĻāĻŋ āĻā§āĻ°āĻŋā§ā§āĻŦāĻ˛ āĻ āĻĨāĻŦāĻž āĻ ā§āĻ¯āĻžāĻ°ā§ āĻĄāĻŋāĻā§āĻ˛ā§ā§āĻžāĻ° āĻāĻ°ā§ āĻĨāĻžāĻā§, āĻ¯āĻžāĻ¤ā§ āĻā§āĻ°āĻŋā§ā§āĻŦāĻ˛ āĻ āĻĨāĻŦāĻž āĻĢāĻžāĻāĻļāĻ¨ā§āĻ° āĻŽāĻžāĻ¨ā§āĻ° āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ° āĻ¸āĻžāĻŦāĻ°ā§āĻāĻŋāĻ¨ āĻ āĻĨāĻŦāĻž āĻĢāĻžāĻāĻļāĻ¨ āĻĨā§āĻā§ āĻĒā§āĻ°āĻ¸ā§āĻĨāĻžāĻ¨ āĻāĻ°āĻžāĻ° āĻĒāĻ°ā§āĻ āĻ āĻŦā§āĻ¯āĻžāĻšāĻ¤ āĻ°āĻžāĻāĻž āĻ¯āĻžā§āĨ¤ Dim āĻ¸ā§āĻā§āĻāĻŽā§āĻ¨ā§āĻ āĻ¨āĻŋā§āĻŽāĻžāĻŦāĻ˛ā§āĻ āĻŦā§āĻ§āĨ¤
āĻ¸ā§āĻā§āĻ¯āĻžāĻāĻŋāĻ āĻ¸ā§āĻā§āĻāĻŽā§āĻ¨ā§āĻ āĻā§āĻ°āĻŋā§ā§āĻŦāĻ˛ āĻ ā§āĻ¯āĻžāĻ°ā§ āĻ¨āĻŋāĻ°ā§āĻ§āĻžāĻ°āĻŖ āĻāĻ°āĻžāĻ° āĻāĻ¨ā§āĻ¯ āĻŦā§āĻ¯āĻŦāĻšāĻžāĻ° āĻāĻ°āĻž āĻ¯āĻžā§ āĻ¨āĻžāĨ¤ āĻ ā§āĻ¯āĻžāĻ°ā§āĻ¸āĻŽā§āĻš āĻ āĻŦāĻļā§āĻ¯āĻ āĻāĻāĻāĻŋ āĻ¨āĻŋāĻ°ā§āĻĻāĻŋāĻˇā§āĻ āĻāĻāĻžāĻ° āĻ āĻ¨ā§āĻ¸āĻžāĻ°ā§ āĻāĻ˛ā§āĻ˛ā§āĻāĻŋāĻ¤ āĻšāĻŦā§āĨ¤
Static VarName[(start To end)] [As VarType], VarName2[(start To end)] [As VarType], ...
Sub ExampleStatic
Dim iCount As Integer, iResult As Integer
For iCount = 0 To 2
iResult = InitVar()
Next iCount
MsgBox iResult,0,"The answer is"
End Sub
āĻ¨āĻŋāĻ°ā§āĻĻāĻŋāĻˇā§āĻ āĻāĻ˛āĻ āĻļā§āĻ°ā§ āĻāĻ°āĻžāĻ° āĻāĻ¨ā§āĻ¯ REM āĻĢāĻžāĻāĻļāĻ¨
Function InitVar() As Integer
Static iInit As Integer
Const iMinimum as Integer = 40 REM āĻĢāĻžāĻāĻļāĻ¨ā§āĻ° āĻ¸āĻ°ā§āĻŦāĻ¨āĻŋāĻŽā§āĻ¨ āĻĒā§āĻ°āĻĻāĻžāĻ¨ āĻŽāĻžāĻ¨
if iInit = 0 then REM check if initialized
iInit = iMinimum
Else
iInit = iInit + 1
End If
InitVar = iInit
End Function