Static Statement /text/sbasic/shared/03103500.xhp
Static statement Static Statement 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 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 ' Function for initialization of the static variable Function InitVar() As Integer Static iInit As Integer Const iMinimum As Integer = 40 ' minimum return value of this function If iInit = 0 Then ' check if initialized iInit = iMinimum Else iInit = iInit + 1 End If InitVar = iInit End Function
n> LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/countusersofdefaultparams.cxx
AgeCommit message (Expand)Author
2018-11-23Bump compiler plugins Clang baseline to 5.0.2Stephan Bergmann
2018-08-10Avoid -Werror=deprecated-declarations with recent Clang trunkStephan Bergmann
2018-04-10put the loplugin output files in the workdirNoel Grandin
2017-12-19Bump --enable-compiler-plugins to Clang 3.8.0Stephan Bergmann
2017-11-07Clean away temporarily added using declarationsStephan Bergmann
2017-06-20reformat some loplugin codeNoel Grandin
2016-10-18loplugins: extract some common functionalityNoel Grandin
2016-09-27clang plugins: do "dotdot" normalisationNoel Grandin
2016-09-06improve loplugin:countusersofdefaultparams to check constructorsNoel Grandin
2016-08-25new loplugin: countusersofdefaultparamsNoel Grandin