refactor: 重构 SnowExample 中的循环结构
- 将 loop 节点下的子节点名称从 initializer 改为 init - 将 loop 节点下的子节点名称从 condition改为 cond - 将 loop 节点下的子节点名称从 update 改为 step
This commit is contained in:
parent
fb1c54998b
commit
d2732857f1
@ -39,11 +39,11 @@ public final class SnowExample {
|
|||||||
body:
|
body:
|
||||||
declare num1: int = 1
|
declare num1: int = 1
|
||||||
loop:
|
loop:
|
||||||
initializer:
|
init:
|
||||||
declare counter:int = 1
|
declare counter:int = 1
|
||||||
condition:
|
cond:
|
||||||
counter <= n
|
counter <= n
|
||||||
update:
|
step:
|
||||||
counter = counter + 1
|
counter = counter + 1
|
||||||
body:
|
body:
|
||||||
num1 = num1 * counter
|
num1 = num1 * counter
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user