test: 修改 Demo24
This commit is contained in:
parent
b058ee4526
commit
b02af0728a
@ -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
|
||||
|
||||
11
playground/Demo/Demo24/OS.snow
Normal file
11
playground/Demo/Demo24/OS.snow
Normal file
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user