lengthIsMax
Short summary
This assertion method checks if the current string stringToCheck length
is equal or less than to maxLength
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| stringToCheck | ( Tc2_System.MAX_STRING_LENGTH ) | current string to check | input |
| maxLength | USINT | upper limit of the length of stringToCheck | input |
| stringLengthUnit | UnicodeStringLengthUnit | string length units of measurement | input |
| message | AssertMessage | message if the assertion is false | input |
Code
Declaration
METHOD lengthIsMax
VAR_INPUT
(* current string to check *)
stringToCheck :WSTRING(Tc2_System.MAX_STRING_LENGTH);
(* upper limit of the length of ``stringToCheck`` *)
maxLength :USINT;
(* string length units of measurement *)
stringLengthUnit :UnicodeStringLengthUnit;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR
Implementation
THIS^.assertion.lengthIsMax(
stringToCheck := ADR(stringToCheck),
maxLength := maxLength,
stringLengthUnit := stringLengthUnit,
message := message
);