break loop control statement in X++ Programming Language

Rumman Ansari   Software Engineer   2023-08-21   7139 Share
☰ Table of Contents

Table of Content:


Syntax


 break; 

Example


// break in while loop example

static void Examples(Args _args)
{ 
    int i = 0;
	while(i < 10) {
		if(i == 3) break; 
        // terminate loop if i is 3
		info(strFmt("i:%1 ",i));
		i++;
		}
	info("Loop complete. ");
}