test: 增加例子代码
This commit is contained in:
parent
2047e97655
commit
638eb245d8
@ -5,6 +5,7 @@ module: Main
|
|||||||
body:
|
body:
|
||||||
declare b1: boolean =true
|
declare b1: boolean =true
|
||||||
|
|
||||||
|
|
||||||
return b1
|
return b1
|
||||||
end body
|
end body
|
||||||
end function
|
end function
|
||||||
|
|||||||
21
playground/Demo5/Main.snow
Normal file
21
playground/Demo5/Main.snow
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
module: Main
|
||||||
|
function: main
|
||||||
|
parameter:
|
||||||
|
return_type: int
|
||||||
|
body:
|
||||||
|
declare b1: boolean = false
|
||||||
|
loop:
|
||||||
|
initializer:
|
||||||
|
declare i:int = 0
|
||||||
|
condition:
|
||||||
|
b1
|
||||||
|
update:
|
||||||
|
i = i + 1
|
||||||
|
body:
|
||||||
|
|
||||||
|
end body
|
||||||
|
end loop
|
||||||
|
return 0
|
||||||
|
end body
|
||||||
|
end function
|
||||||
|
end module
|
||||||
Loading…
x
Reference in New Issue
Block a user