|
Данная статья переведена автоматически. Наведите указатель мыши на предложения статьи, чтобы просмотреть исходный текст. Дополнительные сведения.
|
Перевод
Текст оригинала
|
Оператор AndAlso (Visual Basic)
result = expression1 AndAlso expression2
|
|
|
|
|
True |
True |
True |
|
True |
False |
False |
|
False |
|
False |
Типы данных
Перегрузка
Dim a As Integer = 10 Dim b As Integer = 8 Dim c As Integer = 6 Dim firstCheck, secondCheck, thirdCheck As Boolean firstCheck = a > b AndAlso b > c secondCheck = b > a AndAlso b > c thirdCheck = a > b AndAlso c > b
Public Function findValue(ByVal arr() As Double, ByVal searchValue As Double) As Double Dim i As Integer = 0 While i <= UBound(arr) AndAlso arr(i) <> searchValue ' If i is greater than UBound(arr), searchValue is not checked. i += 1 End While If i > UBound(arr) Then i = -1 Return i End Function