UniBasic Commands Reference - Rocket Software

UniBasic Commands Reference - Rocket Software UniBasic Commands Reference - Rocket Software

rocketsoftware.com
from rocketsoftware.com More from this publisher
11.04.2013 Views

LENS Syntax LENS(dyn.array) Description The UniBasic LENS function returns the length of the values within each element of a dynamic array. LENS supports multibyte languages. With null value handling on, the null value has a length of one byte. Example In the following example, the program segment creates a new array ARRAY1, which contains the length of each element of ARRAY: 1-412 UniBasic Commands Reference ARRAY = '1':@VM:'22':@VM:'333':@VM:'4444':@VM:'55555' ARRAY1 = LENS(ARRAY) ARRAY1 now contains 1}2}3}4}5. Related Commands UniBasic BYTELEN, CHARLEN, DISPLAYWIDTH, ISMB, LEN, MBLEN

LES Syntax LES(array1,array2) Description The UniBasic LES function compares each value in array1 to its corresponding value in array2. UniData returns an array with 1 in each position where the value in array1 is less than or equal to the value in the corresponding value in array2, and 0 in each position when the value in array1 is greater than that in array2. Example In the following example, the program segment compares ARRAY1 to ARRAY2 and returns ARRAY3. ARRAY3 then contains 1}1}1}0}0. ARRAY1 = 9:@VM:10:@VM:30:@VM:50:@VM:60 ARRAY2 = 10:@VM:20:@VM:30@VM:40:@VM:50 ARRAY3 = LES(ARRAY1,ARRAY2) LES 1-413

LES<br />

Syntax<br />

LES(array1,array2)<br />

Description<br />

The <strong>UniBasic</strong> LES function compares each value in array1 to its corresponding<br />

value in array2. UniData returns an array with 1 in each position where the value in<br />

array1 is less than or equal to the value in the corresponding value in array2, and 0<br />

in each position when the value in array1 is greater than that in array2.<br />

Example<br />

In the following example, the program segment compares ARRAY1 to ARRAY2 and<br />

returns ARRAY3. ARRAY3 then contains 1}1}1}0}0.<br />

ARRAY1 = 9:@VM:10:@VM:30:@VM:50:@VM:60<br />

ARRAY2 = 10:@VM:20:@VM:30@VM:40:@VM:50<br />

ARRAY3 = LES(ARRAY1,ARRAY2)<br />

LES 1-413

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!