diff --git a/playground/Demo/Demo18/Main.snow b/playground/Demo/Demo18/Main.snow new file mode 100644 index 0000000..e41610c --- /dev/null +++ b/playground/Demo/Demo18/Main.snow @@ -0,0 +1,43 @@ +module: Main + import: os + function: main + return_type: int + body: + loop: + init: + declare i:int = 1 + cond: + i <= 5 + step: + i = i + 1 + body: + if i % 2 == 0 then + continue + end if + if i > 3 then + break + end if + loop: + init: + declare j:int = 1 + cond: + j <= 5 + step: + j = j + 1 + body: + if j == 4 then + break + end if + if j % 2 == 0 then + continue + end if + print(i) + print(j) + end body + end loop + end body + end loop + return 0 + end body + end function +end module diff --git a/playground/Demo/Demo18/OS.snow b/playground/Demo/Demo18/OS.snow new file mode 100644 index 0000000..6026d43 --- /dev/null +++ b/playground/Demo/Demo18/OS.snow @@ -0,0 +1,11 @@ +module: os + import: os + function: print + parameter: + declare i1: int + return_type: void + body: + syscall("PRINT",i1) + end body + end function +end module \ No newline at end of file