This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 225
Expand file tree
/
Copy pathelse-if.lcdoc
More file actions
52 lines (39 loc) · 1.59 KB
/
else-if.lcdoc
File metadata and controls
52 lines (39 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
Name: else if
Type: keyword
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.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
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
Parameters:
condition (bool):
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>.
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 if><keyword> will be executed.
References: if (control structure), break (control structure),
keyword (glossary), control structure (glossary),
expression (glossary), then (keyword), end (keyword), else (keyword),
control (keyword), switch control structure), repeat (control structure),
try (control structure)