上尉
UID2021766
U币1
G币4102
技术0
主题5
精华0
阅读权限90
注册时间2012-8-26
最后登录2024-4-9
在线时间337 小时
上尉
|
求大神看看代码哪里有问题,帮忙更正一下,谢谢!!
global numbers toolnumbers mom_operation_name
global nStep nt mom_tool_number ni ntd mom_tool_name
set nStep [expr $nStep+1]
#set nt(0) 9999
set nt($nStep) $mom_tool_number
set ntd($nStep) $mom_tool_name
#MOM_output_literal "nt($nStep): $nt($nStep)"
for { set ni 0 } { $ni < $nStep } { incr ni } {
#MOM_output_literal "nt($ni): $nt($ni)"
if { $nt($ni) == $mom_tool_number } {
#MOM_output_literal " Same as before"
set nStep [expr $nStep-1]
if { [string compare $ntd($ni) $mom_tool_name] } {
MOM_abort "\n\n same tool number \n\n 温馨提示您: 刀具 $mom_tool_name 与其他刀具相同刀号 请更改刀号 \n\n\n"
}
return
}
}
set numbers [expr $numbers+1]
set toolnumbers($numbers) $mom_tool_number
#MOM_output_literal "numbers operation end $numbers"
|
|