在Axapta中,break语句将做什么?
我有两个while循环,在第二个循环中有一个中断;(见下面的代码) 我的问题是:中断会导致第二个环路停止还是2个环路停止在Axapta中,break语句将做什么?,axapta,break,x++,Axapta,Break,X++,我有两个while循环,在第二个循环中有一个中断;(见下面的代码) 我的问题是:中断会导致第二个环路停止还是2个环路停止 while select dirPartyRelationship join dirPartyTable where dirPartyTable.RecId == dirPartyRelationship.ChildParty join dirPersonName where dirPersonName.Person == dirPartyTa
while select dirPartyRelationship
join dirPartyTable
where dirPartyTable.RecId == dirPartyRelationship.ChildParty
join dirPersonName
where dirPersonName.Person == dirPartyTable.RecId
{
while select checkDirRelationship
where checkDirRelationship.ChildParty == dirPartyRelationship.RecId
{
if (checkDirRelationship.RelationshipTypeId == _relationshipType)
{
break;
}
}...
中断将仅中断当前代码块 创建作业并使用此示例代码
for(i=0; i<100; i++)
{
for(j=0; j<100; j++)
{
info(strfmt("inner loop count %1",j));
break;
}
info(strfmt("outer loop count %1",i));
}
for(i=0; i<100; i++)
{
for(j=0; j<100; j++)
{
info(strfmt("inner loop count %1",j));
if (somethingToCheck)
{
breakAll = true;
break;
}
}
info(strfmt("outer loop count %1",i));
if (breakAll)
{
break;
}
}