From b02af0728a20106bef6bf905279fa50bb2d6d189 Mon Sep 17 00:00:00 2001 From: Luke Date: Tue, 26 Aug 2025 16:59:25 +0800 Subject: [PATCH] =?UTF-8?q?test:=20=E4=BF=AE=E6=94=B9=20Demo24?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- playground/Demo/Demo24/Main.snow | 10 +++++----- playground/Demo/Demo24/OS.snow | 11 +++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) create mode 100644 playground/Demo/Demo24/OS.snow diff --git a/playground/Demo/Demo24/Main.snow b/playground/Demo/Demo24/Main.snow index a18b417..69de980 100644 --- a/playground/Demo/Demo24/Main.snow +++ b/playground/Demo/Demo24/Main.snow @@ -3,19 +3,19 @@ module: Main function: main returns: void body: - declare a: int = ModuleA.sum(1,2) + declare a: byte = ModuleA.sum(1b,2b) end body end function end module module: ModuleA globals: - declare a: int = 10 + declare a: byte = 10b function: sum params: - declare a: int - declare b: int - returns: int + declare a: byte + declare b: byte + returns: byte body: return a + b end body diff --git a/playground/Demo/Demo24/OS.snow b/playground/Demo/Demo24/OS.snow new file mode 100644 index 0000000..1982627 --- /dev/null +++ b/playground/Demo/Demo24/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