test: 更新 Demo20
This commit is contained in:
parent
d3a85a24bf
commit
7c242d998f
@ -1,11 +1,12 @@
|
|||||||
module: Main
|
module: Main
|
||||||
import: os
|
import:os
|
||||||
function: main
|
function: main
|
||||||
return_type: double
|
return_type: void
|
||||||
body:
|
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 body
|
||||||
end function
|
end function
|
||||||
end module
|
end module
|
||||||
|
|||||||
11
playground/Demo/Demo20/OS.snow
Normal file
11
playground/Demo/Demo20/OS.snow
Normal file
@ -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
|
||||||
Loading…
x
Reference in New Issue
Block a user