PhixFlow Help

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Function: break()

Within a do() or forEach() function break() causes the do() or forEach() functions to stop immediately and return a _NULL value.

If used outside of a do() or forEach() function then break() will cause the analysis for the Stream Set to stop as though a stop() function was called (but will produce an error message rather than a warning message). No records will be saved for that Stream Set.

Syntax

break()

Examples

forEach( $prefix, lookup.prefixes, if( stringLength($prefix) > 20, do ( debug("Stopping because prefix > 20"), break() ) ), $highest = $prefix )

In the above expression the forEach() function will check each prefix in turn until it finds a prefix length greater than 20 at which point a debug message will be printed out to the log and break() will be called which causes the loop to stop processing.

See Also

  • No labels