conditionals examples
This commit is contained in:
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;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user