Home
Products
Community
Manuals
Contact
Login or Signup

BlitzPlus Docs -> 2D - A-Z -> E -> Else If

Else If

Parameters:

None

Description:

During a standard IF ... THEN conditional structure, you may wish to check another condition if the original condition fails. This 'nested IF' situation can get WAY out of hand, and once you have more than two nested conditionals, you should consider aSELECT/CASE structure. See the example.

Example:

; ELSE IF Example

; Input the user's name
name$=Input$("What is your name? ")

; Doesn't the person's name equal SHANE?
If name$ = "Shane" Then

Print "You are recognized, Shane! Welcome!"

Else If name$="Ron" then
Print "You are recognized too, Ron! Welcome!"

Else
Print "Sorry, you don't belong here!"

; End of the condition checking
End If
 

Comments

None.

BlitzPlus Manual Forum

Blitz3D Equivalent Command