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

Related Command UniBasic LTS 1-434 UniBasic Commands Reference

LTS Syntax LTS(array1,array2) Description The UniBasic LTS function compares each element 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 the value in the corresponding position in array2, and 0 in each position for values in array1 that are greater than those in array2. Example In the following example, the program segment compares ARRAY1 to ARRAY2 and returns ARRAY3. ARRAY3 then contains 1}1}0}0}0. ARRAY1 = 9:@VM:10:@VM:30:@VM:50:@VM:60 ARRAY2 = 10:@VM:20:@VM:30@VM:40:@VM:50 ARRAY3 = LTS(ARRAY1,ARRAY2) LTS 1-435

LTS<br />

Syntax<br />

LTS(array1,array2)<br />

Description<br />

The <strong>UniBasic</strong> LTS function compares each element 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 the value in the corresponding position in array2, and 0 in each<br />

position for values in array1 that are greater than those 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}0}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 = LTS(ARRAY1,ARRAY2)<br />

LTS 1-435

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

Saved successfully!

Ooh no, something went wrong!