Ветвления и циклы
For counter = start To end [Step step] [statements] [Exit For] [statements] Next [counter] | Do [{While | Until} condition] [statements] [Exit Do] [statements] Loop |
While condition [statements] Wend | Do [statements] [Exit Do] [statements] Loop [{While | Until} condition] |
For Each element In group [statements] [Exit For] [statements] Next [element] For Each oGeneric In Forms If oGeneric.Name = "Форма 3" Then Exit For EndIf Next oGeneric | With object [statements] End With With MyLabel .Height = 20 .Width = 200 .Caption = "This is MyLabel"End With |
If condition Then [statements] [Else statements] либо If condition Then [statements] [ElseIf condition-n Then [statements] ... [Else [statements]] End If | Choose(index, choice-1[, choice-2, ... [, choice-n]]) Function GetChoice(Ind As Integer) GetChoice = Choose(Ind, "Speedy", "United", "Federal")End Function |
IIf(expr, truepart, falsepart) CheckIt = IIf(TestMe>1000, "Large", "Small") | Select Case expression_переменная [Case expression-n_значение [statements-n]] ... [Case Else [elsestatements]] End Select |
Switch(expr-1, value-1[, expr-2, value-2 … [, expr-n,value-n]]) Matchup = Switch(CityName = "London", "English", CityName = "Rome", "Italian", CityName = "Paris", "French") |
Параметры процедур и функций.
Объявление:
Дата добавления: 2015-07-30; просмотров: 935;