summaryrefslogtreecommitdiff
path: root/examples/if.pipa
diff options
context:
space:
mode:
Diffstat (limited to 'examples/if.pipa')
-rw-r--r--examples/if.pipa16
1 files changed, 13 insertions, 3 deletions
diff --git a/examples/if.pipa b/examples/if.pipa
index 2c5578d..b7cadcb 100644
--- a/examples/if.pipa
+++ b/examples/if.pipa
@@ -1,8 +1,18 @@
fn main(): i32 {
- let n: i32 = 42;
+ let n: i32 = 11;
- if n > 42 {
- return 42;
+ if (n == 11) {
+ if n != 12 {
+ if n < 12 {
+ if n <= 11 {
+ if n > 10 {
+ if n >= 11 {
+ return 42;
+ }
+ }
+ }
+ }
+ }
}
return n;