conditionals examples
This commit is contained in:
parent
511be952aa
commit
8e3994f582
3 changed files with 20 additions and 0 deletions
6
examples/and_or_not.lila
Normal file
6
examples/and_or_not.lila
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
fn main() {
|
||||||
|
yes = true;
|
||||||
|
no = !yes;
|
||||||
|
impossible = yes && no;
|
||||||
|
always = yes || no;
|
||||||
|
}
|
||||||
8
examples/if_else_statement.lila
Normal file
8
examples/if_else_statement.lila
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
fn main() {
|
||||||
|
x = 0;
|
||||||
|
if true {
|
||||||
|
set x = 42;
|
||||||
|
} else {
|
||||||
|
set x = 1337;
|
||||||
|
};
|
||||||
|
}
|
||||||
6
examples/if_statement.lila
Normal file
6
examples/if_statement.lila
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
fn main() {
|
||||||
|
x = 0;
|
||||||
|
if true {
|
||||||
|
set x = 42;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue