|
发表于 2021-10-15 01:36:09
|
显示全部楼层
AA:
gotob AA 需要跳转标记在前用(gotob)向前跳转.
gotof BB 需要跳转标记在后用(gotof)向后跳转.
BB:
变量自定义:
def real shuju1(实数型变量)
def int shuju2 (整数型变量)
def string [20]nom_pice (定义长度20字符串格式NOM_PIECE)
等等
if格式
if 表达式
执行内容
else
执行内容
endif
while循环
while 表达式
循环体
endwhile 结束循环
基本就这些了,希望对你有帮助。
我用if语句和while写个实现同样功能的历程吧。
def int shuju1 = 10
A_1:
if (shuju1>0)
R1=shuju1==0(把比较结果存到R1变量)
shuju1=shuju1-1
if (R1)
gotof AA
endif
else
gotob A_1
endif
AA:
M30
def int shuju2=11
while (shuju2>=0)
shuju2=shuju2-1
G54
endwhile
M30
|
|