break ( : : : )

Terminate loop execution.

break terminates the smallest enclosing for or while loop. Program execution is continued at the next program line after the end of the loop or at the next line after the break statement in case no enclosing loop exists.


Example
read_image (Image, 'monkey')
threshold (Image, Region, 160, 180)
connection (Region, Regions)
Number := |Regions|
AllRegionsValid := 1
* check if for all regions area <=30
for i := 1 to Number by 1
  ObjectSelected := Regions[i]
  area_center (ObjectSelected, Area, Row, Column)
  if (Area > 30)
    AllRegionsValid := 0
    break ()
  endif
endfor

Result

break always returns 2 (H_MSG_TRUE)


Parallelization Information

break is reentrant, local, and processed without parallelization.


See also

for, while


Module

Basic operators



Copyright © 1996-2005 MVTec Software GmbH