English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

In Visual Basic.Net

2007-11-06 16:55:00 · 3 answers · asked by penn_state21 1 in Computers & Internet Programming & Design

3 answers

Yes a boolean value may be used . (True or False) Also boolean values equate to False = 0 and any other non zero value equals true. If a CBool conversion function is used a True always evaluates to the non zero value of -1

Dim myBool as Boolean

if myBool then
' do this if true
else
'do this if false
end if


Dim myInt As Integer
Dim str As String

str = "abc"
myInt = str.Length

If (myInt - 3) Then
Debug.Write("str lenght is three =False")
Else
'The result of myint - 3 = 0 which is a boolean False
Debug.WriteLine("str lenght is three = True")
End If

2007-11-06 17:20:50 · answer #1 · answered by MarkG 7 · 0 0

Relational Expression

2016-11-14 03:32:54 · answer #2 · answered by ? 4 · 0 0

Yes.

2007-11-06 17:19:21 · answer #3 · answered by Anonymous · 0 0

fedest.com, questions and answers