else if

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

# Metadata

Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:

# Syntax

else if condition then statementList

# Params

- condition : Any <expression>. (If the <condition> <evaluate|evaluates> to true, the <statement|statements> execute for that <condition>. If the <condition> <evaluate|evaluates> to false, the <statement> or <statementlist|statement list> following that <condition> is skipped.) - statementList : Of one or more <LiveCode> <statement|statements>, and can also include <if>, <switch>, <try>, or <repeat> <control structure|control structures>.

# Examples

if tPH < 7 then put "acid" into tDescription else if tPH > 7 then put "alkaline" into tDescription else put "neutral" into tDescription end if

# Description

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

# Tags

# See

- **keyword:** then, end, else, control - **glossary:** keyword, control structure, expression - **control structure:** if, break, repeat, try