test: 添加 Demo21 项目

This commit is contained in:
Luke 2025-08-03 00:16:17 +08:00
parent 7c242d998f
commit 60388f6846
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,35 @@
module: Main
import: os
globals:
declare sum: int = 123
function: main
parameter:
return_type: int
body:
declare arr: int[][][][][][][][][][][][][][][][][][][][][][] = [[[[[[[[[[[[[[[[[[[[[[1], [2], [3]]]]]]]]]]]]]]]]]]]]]]
loop:
init:
declare i: int = 0
cond:
i < 3
step:
i = i + 1
body:
arr[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][i][0] = arr[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][i][0] + 1
end body
end loop
loop:
init:
declare i: int = 0
cond:
i < 3
step:
i = i + 1
body:
os.print(arr[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][i][0])
end body
end loop
return 0
end body
end function
end module

View 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