LibreOfficeDev 7.4 Help
Exits a Do...Loop, For...Next, a function, a property, or a subroutine.
Exit Do, Exit For, Exit Function, Exit Property, Exit Sub
Exit Do
Do...Loop λ¬Έ λ΄μμλ§ μ ν¨νλ©° 루νλ₯Ό μ’ λ£ν©λλ€. Loop λ¬Έ λ€μ μ€λ λ¬Έμμ νλ‘κ·Έλ¨ μ€νμ΄ κ³μλ©λλ€. Do...Loop λ¬Έμ΄ μ€μ²©λ κ²½μ° μ½νΈλ‘€μ΄ λ€μ μμ μμ€μ 루νλ‘ μ΄λν©λλ€.
Exit For
For...Next 루ν λ΄μμλ§ μ ν¨νλ©° 루νλ₯Ό μ’ λ£ν©λλ€. Next λ¬Έ λ€μμ μ€λ 첫 λ²μ§Έ λ¬Έμμ νλ‘κ·Έλ¨μ΄ μ€νμ΄ κ³μλ©λλ€. μ€μ²©λ λ¬Έμμλ μ μ΄κ° λ€μ μμ μμ€μ 루νλ‘ μ΄λν©λλ€.
Exit Function
Function νλ‘μμ λ₯Ό μ¦μ μ’ λ£ν©λλ€. Function νΈμΆ λ€μ μ€λ λ¬Έμμ νλ‘κ·Έλ¨ μ€νμ΄ κ³μλ©λλ€.
Exit Property
Exits the Property procedure immediately. Program execution continues with the statement that follows the Property call.
Exit Sub
μλΈλ£¨ν΄μ μ¦μ μ’ λ£ν©λλ€. Sub νΈμΆ λ€μ μ€λ λ¬Έμμ νλ‘κ·Έλ¨ μ€νμ΄ κ³μλ©λλ€.
Exit λ¬Έμ ꡬ쑰μ λμ μ§μ νμ§ μμΌλ©° End λ¬Έκ³Ό νΌλν΄μλ μ λ©λλ€.
Sub ExampleExit
Dim sReturn As String
Dim sListArray(10) As String
Dim siStep As Single
For siStep = 0 to 10 REM Fill array with test data
sListArray(siStep) = chr(siStep + 65)
MsgBox sListArray(siStep)
Next siStep
sReturn = LinSearch(sListArray(), "B")
Print sReturn
End Sub
Function LinSearch( sList(), sItem As String ) As Integer
Dim iCount As Integer
REM LinSearch searches a TextArray:sList() for a TextEntry:
REM Returns the index of the entry or 0 ( Null)
For iCount=1 To Ubound( sList() )
If sList( iCount ) = sItem Then
Exit for REM sItem found
End If
Next iCount
If iCount = Ubound( sList() ) Then iCount = 0
LinSearch = iCount
End Function