The condition query or branching enables you to only output certain values and texts if a particular condition has been fulfilled. The following conditions are supported:
Combination of characters |
Meaning |
== |
equal |
>= |
greater than or equal |
<= |
less than or equal |
! = |
unequal |
< |
smaller |
> |
larger |
This condition is entered as follows:
IF (condition) {Var}
Case 1
ELSE
Case 2
END;
Example
IF (%i==0) {Zst.kXmnFlag}
Addendum modified no
ELSE
Addendum modified yes
END;
If the Zst.kXmnFlag variable is equal to 0, then output the first text, otherwise output the second text. There can be any number of rows between IF, ELSE and END. For each branching opened with IF you must use END; to close it again (do not forget the semicolon after END). The key word ELSE is optional. It reverses the condition. Branchings can be nested within each other up to a depth of 9.
EXAMPLE OF A SIMPLE BRANCHING
IF (%i==1) {ZP[0].Fuss.ZFFmeth}
Calculation of tooth form coefficients according to method: B
END;
If the variable ZP[0].Fuss.ZFFmeth is equal to 1, then output the first text, otherwise it is not output.
EXAMPLE OF ENCAPSULATED BRANCHINGS
IF (%f<=2.7) {z092k.vp} |
|
|||
|
Lubrication regularly by hand |
(Text1 ) |
||
ELSE |
|
|
|
|
|
IF (%f<12) {z092k.vp} |
|
||
|
|
Lubrication with drop dispenser (2 to 6 drops per minute) |
(Text 2) |
|
|
ELSE |
|
|
|
|
|
IF (%f<34) {z092k.vp} |
|
|
|
|
|
Lubrication with oil bath lubrication |
(Text 3) |
|
|
ELSE |
|
|
|
|
|
Lubrication with circulation system lubrication |
(Text4) |
|
|
END; |
|
|
|
END; |
|
|
|
END; |
|
|
|
|
If variable z092k.vp is smaller than or equal to 2.7, text 1 is output. Otherwise you are prompted to confirm that z092k.vp is smaller than 12. If yes, text 2 is output. Otherwise you are prompted to confirm that z092k.vp is smaller than 34. If yes, text 3 is output, otherwise text 4 is output.