Else If

Command groupFlag affectedReversibleExecute on clientPlatform(s)
ConstructsNONOYESAll

Syntax

Else If
 
calculation

Description

This command is used after an If command to mark the beginning of some commands that are carried out if the condition in the preceding If command is false, or the calculation in the Else If command is true.

Example

# In the example below, the value of lGender is tested against the condition

# specified in the If statement.  If the condition fails, control branches to the

# first Else If statement in the method. If the condition again fails, control

# branches to the Else command.

 
If
 
lGender
=
'M'

  
OK message
 
{
Record is MALE
}

Else If
 
lGender
=
'F'

  
OK message
 
{
Record is FEMALE
}

Else
  
OK message
 (
Sound bell
)
 {
GENDER Unknown for this record
}

End If