From e1a7f3310cc84555260ba4e4d68e8e92f87d5590 Mon Sep 17 00:00:00 2001 From: Luke Date: Thu, 31 Jul 2025 14:17:28 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E6=B7=BB=E5=8A=A0=20Bug5=20=E6=A8=A1?= =?UTF-8?q?=E5=9D=97=E8=BF=9B=E8=A1=8C=E6=93=8D=E4=BD=9C=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E4=BA=A4=E4=BA=92=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- playground/BugFarm/Bug5/Main.snow | 16 ++++++++++++++++ playground/BugFarm/Bug5/OS.snow | 11 +++++++++++ 2 files changed, 27 insertions(+) create mode 100644 playground/BugFarm/Bug5/Main.snow create mode 100644 playground/BugFarm/Bug5/OS.snow diff --git a/playground/BugFarm/Bug5/Main.snow b/playground/BugFarm/Bug5/Main.snow new file mode 100644 index 0000000..89c6c84 --- /dev/null +++ b/playground/BugFarm/Bug5/Main.snow @@ -0,0 +1,16 @@ +module: Main + import: os + globals: + declare sum: int = 0 + function: main + parameter: + return_type: int + body: + sum = 20 + + os.print(sum) + + return 0 + end body + end function +end module \ No newline at end of file diff --git a/playground/BugFarm/Bug5/OS.snow b/playground/BugFarm/Bug5/OS.snow new file mode 100644 index 0000000..6026d43 --- /dev/null +++ b/playground/BugFarm/Bug5/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