langs a-z
This commit is contained in:
parent
db842d013d
commit
d066446780
11389 changed files with 98361 additions and 1020 deletions
|
|
@ -0,0 +1,34 @@
|
|||
-- simple construct
|
||||
if logicalCondition then conditionWasTrue()
|
||||
else conditionWasFalse()
|
||||
|
||||
-- multi-line is ok too
|
||||
if logicalCondition
|
||||
then
|
||||
conditionWasTrue()
|
||||
else
|
||||
conditionWasFalse()
|
||||
|
||||
-- using block stuctures
|
||||
if logicalCondition then do
|
||||
conditionWasTrue()
|
||||
...
|
||||
end
|
||||
else do
|
||||
conditionWasFalse()
|
||||
...
|
||||
end
|
||||
|
||||
-- if/else if...
|
||||
if logicalCondition1 then do
|
||||
condition1WasTrue()
|
||||
...
|
||||
end
|
||||
else if logicalCondition2 then do
|
||||
condition2WasTrue()
|
||||
...
|
||||
end
|
||||
else do
|
||||
conditionsWereFalse()
|
||||
...
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue