From b033d53d28df6675f0e9060029669e048b2b7983 Mon Sep 17 00:00:00 2001 From: Luke Date: Tue, 26 Aug 2025 17:30:15 +0800 Subject: [PATCH] =?UTF-8?q?test:=20Demo24=20=E5=A2=9E=E5=8A=A0=E6=9B=B4?= =?UTF-8?q?=E5=A4=9A=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- playground/Demo/Demo24/Main.snow | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/playground/Demo/Demo24/Main.snow b/playground/Demo/Demo24/Main.snow index 69de980..abda9ee 100644 --- a/playground/Demo/Demo24/Main.snow +++ b/playground/Demo/Demo24/Main.snow @@ -1,21 +1,24 @@ module: Main import: ModuleA,os + globals: + declare const c: int = 10 function: main returns: void body: - declare a: byte = ModuleA.sum(1b,2b) + declare a: int = ModuleA.sum(c,2) + os.print(a) end body end function end module module: ModuleA globals: - declare a: byte = 10b + declare const a: int = 10 function: sum params: - declare a: byte - declare b: byte - returns: byte + declare a: int + declare b: int + returns: int body: return a + b end body