Skip to main content

valueIsInRangeOf

Short summary​

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

Attention: limits are included: valueIsInRangeOf(ldate#1970-01-01, ldate#1970-01-01, ldate#1970-01-01) is a true assertion

Parameters​

NameTypeCommentKind
lowerLimitLDATElower limit for the current valueinput
currentValueLDATEcurrent value to checkinput
upperLimitLDATEupper limit for the current valueinput
messageAssertMessagemessage if the assertion is falseinput

Code​

Declaration​

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