Set break calculation

Command groupFlag affectedReversibleExecute on clientPlatform(s)
DebuggerNONONOAll

Syntax

Set break calculation
 
on 
field-name
 {
calculation
}

Description

This command stops method execution when the specified calculation evaluates to true; all values except zero are considered true. You use Set break calculation after a Variable menu command: Set break on calculation {field-name} command. The field used in the command does not have to feature in the calculation but is used to "label" the break within Omnis.

At breakpoints, a method design window is opened with the current method loaded and the breakpoint command highlighted. You can examine field values by right button/ Ctrl-clicking on the field or step through the remaining method.

Setting up calculated breakpoints slows down method execution considerably so you should use them sparingly. In runtime the command does nothing.

Example

# pause method execution when lMyBoolean=kTrue

Calculate
 
lMyBoolean
 as 
kFalse

Variable menu command
 
Set Break On Calculation
 
lMyBoolean

Set break calculation
 
on 
lMyBoolean
 {
lMyBoolean
=
kTrue
}

For
 
lCount
 
from
 
1
 
to
 
10
 
step
 
1

  
If
 
lCount
=5

    
Calculate
 
lMyBoolean
 as 
kTrue

  
End If
End For