# How to use an array to solve the following...

dunbarx at aol.com dunbarx at aol.com
Sun Feb 19 22:42:47 CST 2012

```Kay's is much faster than mine.

Well done.

Craig Newman

-----Original Message-----
From: Glen Bojsza <gbojsza at gmail.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Sun, Feb 19, 2012 9:49 pm
Subject: Re: How to use an array to solve the following...

Hi Kay,

This looks very good mainly the use of case with the decision being the

Also, I didn't realize that arrays would be slower... I will test this with
some of the data sets ... currently up to 80,000 lines but with values I
have indicated... but I like the simplicity.

I posted the bigger picture but it got jammed due to size so I just pasted
the new info here...

The biggest picture would be having 10 lists with each list having the xs
column but a different ?t column (wt, gt, st, mt, qt, ... etc)

The first and last xs value for each list will always be the same and can
start at 10 and go to 100,000+ but other than that there will be randomness
in the step increments.

The goal would be the same but towards building a master list where each
associated column would meet the neighbor criteria with the xs column. You
can see the xs column increments grow and the already established column
values (in this case wt) get a value of 0 for the new xs increments.

Given this and the possible number of columns and values is there still a
good approach in using arrays?

For example...

we see from
Pacer List

xs     wt
10      6
80      7
130    23

we got

Master list

xs     wt
10      6
80      7
130    23

Train List
xs     gt
10     32
40     67
130   55

new master list would be

xs     wt    gt
10      6    32
20      0      0
30      0      0 <-- added to xs updated wt value
40      0     67 <-- added to xs updated wt value
50      0      0 <-- added to xs updated wt value
70      0      0
80      7      0
90      0      0
120    0      0
130    23    55
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com