Break Statement (FPScript)

09.03.2021

Ends a loop prematurely.

Syntax

Break

Remarks

The Break statement cannot be used in a parallel loop.

If you use the Break statement in the inner loop of a nested loop, only the internal loop is terminated.

If you use the Break statement outside of a loop, the formula is terminated and an empty value is returned.

Available in

FlexPro View, Basic, Professional, Developer Suite

Example

The following example adds up the values of a data series up to the first void value:

Dim Result = 0
For Each Value v in DataSeries Do
    If v == ? Then
        Break
    End
    Result = Result + v
End

Share article or send as email:

You might be interested in these articles