Bond

Adding a Bond (while)

The bond enables to repeat several times a set of items, until the bond condition is false, joining them with operators .AND. or .OR. The last bond sub-item to be executed, must be an execution with operator .END.

A bond can have as sub-item other bonds, or conditions and executions.

The field corresponding to bond can be enabled by pressing [F7], and it is classified in the formula structure with caption .

Example 1:

For all active employees, monthly salary must be returned, according to the condition example.

Example 2:

Type

Result

Operator 1

1st Expression

Operator 2

2nd Expression

Operator 3

Bond

 

 

!Eof

 

 

.AND.

Bond

 

 

R8_FILIAL+R8_MAT

==

RA_FILIAL+RA_MAT

.END.

Condition

 

 

Empty(dDtFim)

 

 

.END.

Execution

sDtFim

:=

SR8->R8_DATAFIM

 

 

.END.

Execution

dbSkp()

 

 

 

 

.END.

As to tables, it is required to use the command dbSkip() or fo_Skip() within the bond, to avoid freezing. In this example, if there was no call of function dbSkip(), the object would always be placed in the same register, causing the server to freeze.