while循环不理解,要怎么理解
var bx=0;var by=H-b1-40;
while(bx<W)
{
pOut += "G1 "+(bx+ 0)+" "+(by+30)+" "+d1+"\r\n";
if(bx+40>W)
{
pOut += "G1 "+W+" "+(by+30)+" "+d1+"\r\n";
pOut += "\r\n";
pOut += "T "+t1+"\r\n";
pOut += "G1 "+W+" "+(by+20)+" "+d1+"\r\n";
}
else
{
pOut += "G1 "+(bx+40)+" "+(by+30)+" "+d1+"\r\n";
pOut += "G1 "+(bx+40)+" "+(by+20)+" "+d1+"\r\n";
}
pOut += "G1 "+(bx+10)+" "+(by+20)+" "+d1+"\r\n";
pOut += "G1 "+(bx+10)+" "+(by+10)+" "+d1+"\r\n";
if(bx+50>W)
{
pOut += "G1 "+W+" "+(by+10)+" "+d1+"\r\n";
}
else
{
pOut += "G1 "+(bx+50)+" "+(by+10)+" "+d1+"\r\n";
}
bx=bx+50;
}
pOut += "\r\n";
return pOut;
} 什么语言呐…… 无符号整形 发表于 2018-8-19 10:16
什么语言呐……
delphi 吧 while(x),x为0表示假,不执行里面的语句,x为非0表示真,执行里面的语句,当执行完最后一条语句时回到while(x)继续判断。 曾日希 发表于 2018-8-19 11:42
while(x),x为0表示假,不执行里面的语句,x为非0表示真,执行里面的语句,当执行完最后一条语句时回到while ...
感谢,你解释的很清楚,我试着写一下试试
这应该不是Delphi吧,
页:
[1]