valueIsNegative
Short summary
This assertion method checks if the current value is negative
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| currentValue | DINT | current value to check | input |
| message | AssertMessage | message if the assertion is false | input |
Code
Declaration
METHOD valueIsNegative
VAR_INPUT
(* current value to check *)
currentValue :DINT;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR
Implementation
IF (currentValue >= 0) THEN
THIS^.assertionWasWrong(message, THIS^.getDebugInfo('valueIsNegative'));
END_IF