Condition and several alternatives (If... Else If... End If)

If construct to branch into several different blocks of code.

 

If Parameter1 = 10 Then

   DoAny := 10

ElseIf Parameter1 = 20 Then

   DoAny := 11

ElseIf Parameter1 = 30 Then

   DoAny := 12

Else

   DoAny := 100

End If

The variable DoAny gets a value of 10 if parameter1 has a value of 10, otherwise the value is 11 if parameter1 has a value of 20, otherwise the value is 12 if parameter1 has a value of 30, otherwise it has a value of 100.