else if

Typekeyword
DictionaryLCS
LibraryLiveCode Script
Syntax
else if <condition> then
   <statementList>
Summary

Used within an if control structure to evaluate an alternate condition|conditional expression and contain a statement or statementlist|statement list to be executed if its condition|conditional expression is true.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Parameters
NameTypeDescription
condition

Any expression. (If the condition evaluates to true, the statements execute for that condition. If the condition evaluates to false, the statement or statementlist|statement list following that condition is skipped.)

statementList

Of one or more LiveCode statements, and can also include if, switch, try, or repeat controlstructures.

Example
if tPH < 7 then
   put "acid" into tDescription
else if tPH > 7 then
   put "alkaline" into tDescription
else
   put "neutral" into tDescription
end if
RelatedKeyword: then, end, else, control
Glossary: keyword, control structure, expression
Control Structure: if, break, repeat, try
Description

Use the else if keyword to add an alternate condition|conditional expression to be evaluated in the if control structure. If the conditional expression|condition evaluates to true then the statement or statementlist|statement list following the else ifkeyword will be executed.