valueIsEven
Short summary
This assertion method checks if the current value is even
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| currentValue | UDINT | current value to check | input |
| message | Tc2_System.T_MaxString | message if the assertion is false | input |
Code
Declaration
METHOD valueIsEven
VAR_INPUT
(* current value to check *)
currentValue :UDINT;
(* message if the assertion is false *)
message :Tc2_System.T_MaxString;
END_VAR
Implementation
IF ((currentValue AND THIS^.LSB_MASK) <> 0) THEN
THIS^.assertionWasWrong(message, THIS^.getDebugInfo('valueIsEven'));
END_IF