From 7c242d998fdebb4e10b28447fdfba850941f3c2e Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 3 Aug 2025 00:08:56 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E6=9B=B4=E6=96=B0=20Demo20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- playground/Demo/Demo20/Main.snow | 9 +++++---- playground/Demo/Demo20/OS.snow | 11 +++++++++++ 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 playground/Demo/Demo20/OS.snow diff --git a/playground/Demo/Demo20/Main.snow b/playground/Demo/Demo20/Main.snow index 94dd6ea..c3ba2e4 100644 --- a/playground/Demo/Demo20/Main.snow +++ b/playground/Demo/Demo20/Main.snow @@ -1,11 +1,12 @@ module: Main - import: os + import:os function: main - return_type: double + return_type: void body: - declare n: double[] = [10.0] + declare arr: int[] = [1, 2, 3] + arr[0] = 5 - return n[0] + 1.0 + os.print(arr[0]) end body end function end module diff --git a/playground/Demo/Demo20/OS.snow b/playground/Demo/Demo20/OS.snow new file mode 100644 index 0000000..6026d43 --- /dev/null +++ b/playground/Demo/Demo20/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