CreateAssertionErrorMessageNonEqualArrayBounds (FUN)

FUNCTION CreateAssertionErrorMessageNonEqualArrayBounds : WSTRING(Constants.WSTRING_LENGTH)

Helper function to create an error message for non-equal bounds of an array.

InOut:

Scope

Name

Type

Comment

Return

CreateAssertionErrorMessageNonEqualArrayBounds

WSTRING(Constants.WSTRING_LENGTH)

a WSTRING similar to “Assertion failed: <Lower/Upper> bounds differ in dimension <diDimension> (expected <diExpectedBound> but got <diActualBound>)”

Input

diExpectedBound

DINT

the upper or lower bound of the reference array

diActualBound

DINT

the upper or lower bound of the actual array

xIsLowerBound

BOOL

if set to TRUE the error message contains Lower bounds otherwise Upper bounds

diDimension

DINT

the dimension in which the bounds differ