Performs a less than or equal to comparison on elements of two dynamic arrays.
function compares each corresponding numeric element from two dynamic arrays and determines if the first value is less than or equal to the second value. It returns a dynamic array of boolean values in which each element comparison is represented. It returns a 1 if the dynarray1
element value is less than or equal to the dynarray2
element value. It returns a 0 if the dynarray1
element value is greater than the dynarray2
removes signs and leading and trailing zeros from element values before making the comparison. If an element is missing, or has a null string or a non-numeric value, LES
assigns it a value of 0 for the purpose of this comparison.
If the two dynamic arrays have different numbers of elements, the returned dynamic array has the number of elements of the longer dynamic array. By default, the shorter dynamic array is padded with 0 value elements for the purpose of comparison. You can also use the REUSE
function to define behavior when specifying two dynamic arrays with different numbers of elements.
For two elements to be compared, they must be on the same dynamic array level. For example, you cannot compare a value mark (@VM) dynamic array element to a subvalue mark (@SM) dynamic array element.
The following example uses the LES
function to return a less than or equal to comparison for each of the elements in dynamic arrays a
! returns 1ý0ý1ý0