diff --git a/playground/Demo/Demo21/Main.snow b/playground/Demo/Demo21/Main.snow new file mode 100644 index 0000000..f3b11ce --- /dev/null +++ b/playground/Demo/Demo21/Main.snow @@ -0,0 +1,35 @@ +module: Main + import: os + globals: + declare sum: int = 123 + function: main + parameter: + return_type: int + body: + declare arr: int[][][][][][][][][][][][][][][][][][][][][][] = [[[[[[[[[[[[[[[[[[[[[[1], [2], [3]]]]]]]]]]]]]]]]]]]]]] + loop: + init: + declare i: int = 0 + cond: + i < 3 + step: + i = i + 1 + body: + arr[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][i][0] = arr[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][i][0] + 1 + end body + end loop + loop: + init: + declare i: int = 0 + cond: + i < 3 + step: + i = i + 1 + body: + os.print(arr[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][i][0]) + end body + end loop + return 0 + end body + end function +end module diff --git a/playground/Demo/Demo21/OS.snow b/playground/Demo/Demo21/OS.snow new file mode 100644 index 0000000..6026d43 --- /dev/null +++ b/playground/Demo/Demo21/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