From 5537a448e848bd14a14f2c7f60e86c99a3c293c1 Mon Sep 17 00:00:00 2001 From: Luke Date: Tue, 26 Aug 2025 18:09:01 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E6=B7=BB=E5=8A=A0=20Demo25=20=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- playground/Demo/Demo25/Main.snow | 23 +++++++++++++++++++++++ playground/Demo/Demo25/OS.snow | 11 +++++++++++ 2 files changed, 34 insertions(+) create mode 100644 playground/Demo/Demo25/Main.snow create mode 100644 playground/Demo/Demo25/OS.snow diff --git a/playground/Demo/Demo25/Main.snow b/playground/Demo/Demo25/Main.snow new file mode 100644 index 0000000..d83e6a4 --- /dev/null +++ b/playground/Demo/Demo25/Main.snow @@ -0,0 +1,23 @@ +module: Main + import: os,ModuleA + globals: + declare c: int = 10 + function: main + returns: void + body: + c = ModuleA.getA() + os.print(c) + end body + end function +end module + +module: ModuleA + globals: + declare a: int = 2 + function: getA + returns: int + body: + return a + end body + end function +end module diff --git a/playground/Demo/Demo25/OS.snow b/playground/Demo/Demo25/OS.snow new file mode 100644 index 0000000..1982627 --- /dev/null +++ b/playground/Demo/Demo25/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