Break Statement

Action

Transfers control of the script out of the innermost nested for, for each, while, switch, or select statement.

Syntax

break

Notes

Use a break statement to terminate another statement early if specific conditions occur.

Example

[-] main ()
	[ ] INTEGER I = 1 
	[-] while (TRUE)
		[ ] Print (I) 
		[-] if (I>= 5) 
			[ ] break
		[ ] I = I + 1 
	[ ] // This script prints:
	[ ] //1
	[ ] //2
	[ ] //3
	[ ] //4
	[ ] //5