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++
+10 years of experience with hands-on lead-level background in the full life cycle of software development with demonstrated cross-functional team leadership skills.
Programming:
• ERP :Microsoft Dynamics AX 2012
• Language :X++, C#, C++, XAML, Asp.Net, Html, VB.Net, Android
• Environment : Windows XP, Windows 8, Windows 10, Windows Server
• DataBase : Oracle 9i,10g,11g and SqlServer and SQLlite
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...
-
In Reporting Services, reports and resources are processed under the security identity of the user who is running the report. If the report ...
-
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) ...
-
To integrate Microsoft Dynamics AX and Analysis Services, you must connect Analysis Services to the Application Object Server (AOS). To do s...
No comments:
Post a Comment