Skip to main content

lengthIsBetween

Short summary

This assertion method checks if the current string stringToCheck length is between minLength and maxLength

Parameters

NameTypeCommentKind
stringToCheck( Tc2_System.MAX_STRING_LENGTH )current string to checkinput
minLengthUSINTlower limit of the string lengthinput
maxLengthUSINTupper limit of the string lengthinput
stringLengthUnitUnicodeStringLengthUnitstring length units of measurementinput
messageAssertMessagemessage if the assertion is falseinput

Code

Declaration

METHOD lengthIsBetween
VAR_INPUT
(* current string to check *)
stringToCheck :WSTRING(Tc2_System.MAX_STRING_LENGTH);
(* lower limit of the string length *)
minLength :USINT;
(* upper limit of the string length *)
maxLength :USINT;
(* string length units of measurement *)
stringLengthUnit :UnicodeStringLengthUnit;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR