主程序main.grs:
NUMBER/RSP,RESP
ENTITY/Gear
STRING/MENU(5,20)
DATA/MENU,'type,$
'cicular‘,$
'ell‘,$
'egg',$
'cone'
L0:
CHOOSE/MENU,DEFLT,1,RSP $$进入设计,选择类型
JUMP/L0:,L5:,,,L1:,L2:,L3:,L4:,RsP
L1:
CALL/'Circular',Gear $$调用Circular.grs子程序
JUMP/L5:
L2:
CALL/'Ell',Gear $$调用Elli.grs子程序
JUMP/L5:
L3:
CALL/'Egg',Gear $$调用Egg.grs子程序
JUMP/L5:
L4:
CALL/'Cone',Gear $$调用Cone.grs子程序
L5:
CHOOSE/'CHOOSE OPTIONS','CONTINUE DESIGN','QUIT',RESP
JUMP/L5:,,,,L0:,,RESP
L6:
HALT
其中一个子程序,Circular.grs:
PROC/Gear1
$$程序体
RETURN |