Algorithm time...
Glen Bojsza
gbojsza at gmail.com
Sun Dec 9 17:39:11 EST 2012
I removed my code that gives the actual item 1 value... setting it back to
your original code.
Then I removed your line "put 0 into tLineNumber".
The results only gave a couple of data points and not the actual value of
item 1.
===========
*on* mouseUp
*put* fld mydata into plines
*put* the number of lines in pLines div 1000 into tGroupSize
*set* the itemDelimiter to tab
*repeat* for each line tLine in pLines
*add* 1 to tLineNumber
*put* item 2 of tLine into tValue
*if* tIndex[ tValue ] is empty *then*
*put* tLineNumber into tIndex[ tValue ]
*end* *if*
*if* tLineNumber is tGroupSize *then*
*put* the keys of tIndex into tValues
*replace* cr with comma in tValues
*put* min( tValues ) into tMin
*put* max( tValues ) into tMax
*if* tIndex[ tMin ] < tIndex[ tMax ] *then*
*put* tIndex[ tMin ] & tab & tMin & cr after tResult
*put* tIndex[ tMax ] & tab & tMax & cr after tResult
*else*
*put* tIndex[ tMax ] & tab & tMax & cr after tResult
*put* tIndex[ tMin ] & tab & tMin & cr after tResult
*end* *if*
*put* empty into tIndex
*--put 0 into tLineNumber*
*end* *if*
*end* *repeat*
*end* mouseUp
On Sun, Dec 9, 2012 at 3:45 PM, Dick Kriesel <dick.kriesel at mail.com> wrote:
>
> On Dec 9, 2012, at 12:37 PM, Glen Bojsza wrote:
>
> > So there must be a better way to get the item 1 value and still stay in
> the
> > millisecond range...or not?
>
>
> Did you remove the line I mentioned, verify the results, and check the
> timing?
>
> -- Dick
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list