Adding 1 to an array
David Bovill
david at openpartnership.net
Sat Jun 23 18:44:08 EDT 2007
On 23/06/07, Jim Ault <JimAultWins at yahoo.com> wrote:
> There must be more to the story, but why not use two lines and forget the
> function call?
>
> get "hello,1"
> split it using cr and comma
Yes - the story is I was looking for the fastest way I could think of
combining hit counts for tags. That is if I have one list (I call them
indexes if they are CR delimited) for items tagged "xml" and another for
"html" etc and one item could be in several lists... well I was thinking it
would be a lot faster to use built in array commands than to repeat over
keys or lines. So I was thinking of doing intersects of arrays and adding 1
to each element in the resulting intersect as a way of generating hit
counts:
put xmlHitCountArray into doubleHitArray
intersect doubleHitArray with htmlHitCountArrray
add 1 to xmlHitCountArray
More information about the use-livecode
mailing list