Tuesday, March 5, 2013

If...Then...Else Statement (Visual Basic)

Struktur kendali...
if..then..else..


beginilah caranya...





If condition [ Then ]
    [ statements ]
[ ElseIf elseifcondition [ Then ]
    [ elseifstatements ] ]
[ Else
    [ elsestatements ] ]
End If
-or-
If condition Then [ statements ] [ Else [ elsestatements ] ]


condition
Required. Expression. Must evaluate to True or False, or to a data type that is implicitly convertible to Boolean.
Then
Required in the single-line form, optional in the multiple-line form.
statements
Optional. One or more statements following If...Then that are executed if condition evaluates to True.
elseifcondition
Required if ElseIf is present. Expression. Must evaluate to True or False, or to a data type that is implicitly convertible to Boolean.
elseifstatements
Optional. One or more statements following ElseIf...Then that are executed if elseifcondition evaluates to True.
elsestatements
Optional. One or more statements that are executed if no previous condition or elseifcondition expression evaluates to True.
End If
Terminates the If...Then...Else block.

0 comments:

Post a Comment

luvne.com resepkuekeringku.com desainrumahnya.com yayasanbabysitterku.com