Welcome to jBASE's new documentation site! Many answers to your questions can be found by searching the Knowledgebase or viewing the jBASE Documentation. We also have a Google Group for peer discussion about jBASE. If you are unable to find the information you are looking for, jBASE Support will be glad to assist in resolving your technical problems. Enjoy and please provide comments and feedback .

How can we help you?

LES

Description

The LES() function is used to determine whether elements of one dynamic array are less than or equal to the elements of another dynamic array.

LES(array1, array2)

In operation, the function compares each element of array1 with the corresponding element of array2. If the element from array1 is less than or equal to the element from array2, a one (1) is returned in the corresponding element of a new dynamic array. If the element from array1 is greater than the element from array2, it returns a zero (0).

If an element of one dynamic array has no corresponding element in the other dynamic array, it evaluates the undefined element as empty, and the comparison continues.

If either of a corresponding pair of elements is null, it returns null for that element. 


An example of use is as:

     VAL =" "
     FOR I = 1 TO 3
         INS I BEFORE VAL<1>
     NEXT I

     VAL2 =" "
     FOR I = 2 TO 4
         INS I*3 BEFORE VAL2<-3>
     NEXT I

     CRT VAL
     CRT VAL2
     CRT (LES(VAL, VAL2))


Go back to jBASE BASIC.

Was this article helpful?