/ If...Then Statement
IF <Condition>
THEN
<Statements>
ENDIF
/ If...Then...Else Statement
IF <Condition>
THEN
<Statements>
ELSE
<Statements>
ENDIF
/ ElseIf Statement
IF <Condition>
THEN
<Statements>
ELSEIF <Condition>
THEN
<Statements>
ELSE
<Statements>
ENDIF
/ If...Then Statement
IF Age < 16
THEN
CanDrive ← FALSE
ENDIF
/ If...Then...Else Statement
IF IsGreen
THEN
OUTPUT "Green"
ELSE
OUTPUT "Blue"
ENDIF
/ ElseIf Statement
IF Score > 1000
THEN
Multiplier ← 10
ELSEIF Score < 500
THEN
Multiplier ← 0
ELSE
Multiplier ← 5
ENDIF
VB.NET
'If...Then StatementIf<Condition>Then<Statements>EndIf'If...Then...Else StatementIf<Condition>Then<Statements>Else<Statements>EndIf'Else If StatementIf<Condition>Then<Statements>ElseIf<Condition>Then<Statements>Else<Statements>EndIF
'If...Then StatementIfAge<16ThenCanDrive=FalseEndIf'If...Then...Else StatementIfIsGreenThenConsole.WriteLine("Green")ElseConsole.WriteLine("Blue")EndIf'Else If StatementIfScore>1000ThenMultiplier=10ElseIfScore<500ThenMultiplier=0ElseMultiplier=5EndIf
IF <Condition>
THEN
IF <Condition>
THEN
<Statements>
ENDIF
ENDIF
IF Found = False
THEN
IF Searching = false
THEN
CALL Search()
ENDIF
ENDIF
IF Age >= 16
THEN
IF PassedLicenceTest = True
THEN
CALL GenerateLicence()
ELSEIF TakenTest = False
THEN
OUTPUT "You need to take the test to get your licence"
ELSE
OUTPUT "You Failed Your Test"
OUTPUT "You need to pass the test to get your licence"
ENDIF
ELSE
OUTPUT "Ineligible for Licence"
ENDIF
IfFound=FalseThenIfSearching=falseThenSearch()EndIfEndIfIfAge>=16ThenIfPassedLicenceTest=TrueThenGenerateLicence()ElseIfTakenTest=FalseThenConsole.WriteLine("You need to take the test to get your licence")ElseConsole.WriteLine("You Failed Your Test")Console.WriteLine("You need to pass the test to get your licence")EndIfElseConsole.WriteLine("Ineligible for Licence")EndIf
CASE OF <identifier>
<value 1> : <statement>
<value 2> : <statement>
...
ENDCASE
CASE OF <identifier>
<value 1> : <statement>
<value 2> : <statement>
...
OTHERWISE <statement>
ENDCASE
/ If...Then Statement
IF Age < 16
THEN
CanDrive ← FALSE
ENDIF
/ If...Then...Else Statement
IF IsGreen
THEN
OUTPUT "Green"
ELSE
OUTPUT "Blue"
ENDIF
/ ElseIf Statement
IF Score > 1000
THEN
Multiplier ← 10
ELSEIF Score < 500
THEN
Multiplier ← 0
ELSE
Multiplier ← 5
ENDIF
VB.NET
'If...Then StatementIf<Condition>Then<Statements>EndIf'If...Then...Else StatementIf<Condition>Then<Statements>Else<Statements>EndIf'Else If StatementIf<Condition>Then<Statements>ElseIf<Condition>Then<Statements>Else<Statements>EndIF
'If...Then StatementIfAge<16ThenCanDrive=FalseEndIf'If...Then...Else StatementIfIsGreenThenConsole.WriteLine("Green")ElseConsole.WriteLine("Blue")EndIf'Else If StatementIfScore>1000ThenMultiplier=10ElseIfScore<500ThenMultiplier=0ElseMultiplier=5EndIf