diff --git a/playground/Demo/Demo22/Main.snow b/playground/Demo/Demo22/Main.snow new file mode 100644 index 0000000..1c727b4 --- /dev/null +++ b/playground/Demo/Demo22/Main.snow @@ -0,0 +1,12 @@ +module: Main + import: os,ModuleA + globals: + declare sum: int = 3 + function: main + returns: void + body: + sum = sum + ModuleA._sum(1, 2) + os.print(sum) + end body + end function +end module diff --git a/playground/Demo/Demo22/ModuleA.snow b/playground/Demo/Demo22/ModuleA.snow new file mode 100644 index 0000000..c5c9a86 --- /dev/null +++ b/playground/Demo/Demo22/ModuleA.snow @@ -0,0 +1,11 @@ +module: ModuleA + function: _sum + params: + declare a: int + declare b: int + returns: int + body: + return a + b + end body + end function +end module \ No newline at end of file diff --git a/playground/Demo/Demo22/OS.snow b/playground/Demo/Demo22/OS.snow new file mode 100644 index 0000000..1982627 --- /dev/null +++ b/playground/Demo/Demo22/OS.snow @@ -0,0 +1,11 @@ +module: os + import: os + function: print + params: + declare i1: int + returns: void + body: + syscall("PRINT",i1) + end body + end function +end module \ No newline at end of file