You can use continue and break statements within all three loops to tell the
execution to break or continue.
The break statement completely interrupts a loop at any time. The best example
of a break is in a switch statement.
The continue statement ignores the rest of the current loop and continues to
control the loop. The following example uses a for loop with the continuestatement to control which values print to the screen. The loop executes the print
statement for values <= 3 and >= 8.int counter;
for (counter=1;counter <= 10;counter++)
{
if (counter > 3 && counter < 8)
{
continue;
}
print counter;
}
pause;Result:
1
2
3
8
9
10
Best Regards,
Hossein Karimi
Friday, June 29, 2018
Continue and Break Statements
Labels:
X++

Subscribe to:
Post Comments (Atom)
Configure the Firewall on the Enterprise Portal Server
After you install Enterprise Portal, enable Web Server (HTTP) in Windows Firewall. If you do not enable the web server in Windows Firewall...
-
To integrate Microsoft Dynamics AX and Analysis Services, you must connect Analysis Services to the Application Object Server (AOS). To do s...
-
The below select query will give the both the Sales Line record count and the sum of sales quantity. static void Test_Data(Args _args) ...
-
A List object contains members that are accessed sequentially. Lists are structures that can contain members of any X++ type. All the member...
No comments:
Post a Comment