-
Notifications
You must be signed in to change notification settings - Fork 0
Conditions
Mel Florance edited this page Jul 23, 2020
·
3 revisions
Bird Lang supports conditionnal statements with the following keywords:
- if
- else
- elseif
Use the if statement to specify a block of code to be executed if a condition is true:
Example:
> if 1 < 2 then true
trueUse the else statement to specify a block of code to be executed if the condition is false:
Example:
> if 1 > 2 then true else false
falseUse the elseif statement to specify a new condition if the first condition is false:
Example:
> if 1 == 2 then true else if 2==2 then 2 else false
2