Skip to main content

valueIsInRangeOf

Short summary

This assertion method checks if the current value is inside a limit

Attention: limits are included: valueIsInRangeOf(3, 3, 3) is a true assertion

Parameters

NameTypeCommentKind
lowerLimit__XINTlower limit for the current valueinput
currentValue__XINTcurrent value to checkinput
upperLimit__XINTupper limit for the current valueinput
messageAssertMessagemessage if the assertion is falseinput

Code

Declaration

METHOD valueIsInRangeOf
VAR_INPUT
(* lower limit for the current value *)
lowerLimit :__XINT;
(* current value to check *)
currentValue :__XINT;
(* upper limit for the current value *)
upperLimit :__XINT;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR