test: 修改 Demo24
This commit is contained in:
parent
b058ee4526
commit
b02af0728a
@ -3,19 +3,19 @@ module: Main
|
|||||||
function: main
|
function: main
|
||||||
returns: void
|
returns: void
|
||||||
body:
|
body:
|
||||||
declare a: int = ModuleA.sum(1,2)
|
declare a: byte = ModuleA.sum(1b,2b)
|
||||||
end body
|
end body
|
||||||
end function
|
end function
|
||||||
end module
|
end module
|
||||||
|
|
||||||
module: ModuleA
|
module: ModuleA
|
||||||
globals:
|
globals:
|
||||||
declare a: int = 10
|
declare a: byte = 10b
|
||||||
function: sum
|
function: sum
|
||||||
params:
|
params:
|
||||||
declare a: int
|
declare a: byte
|
||||||
declare b: int
|
declare b: byte
|
||||||
returns: int
|
returns: byte
|
||||||
body:
|
body:
|
||||||
return a + b
|
return a + b
|
||||||
end body
|
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