Its about 20,000 lines. I have made it with cutting into halves, which works ok. Perhaps I give it a timestamp test compared to just looping through. Tiemo
> -----Ursprüngliche Nachricht----- > Von: use-livecode [mailto:[email protected]] Im Auftrag > von [email protected] > Gesendet: Donnerstag, 31. Januar 2013 18:56 > An: [email protected] > Betreff: Re: to find the first numeric line? > > Hi. > > > If you sort your alphanumeric list, you will, of course, already know that > the alphas sort before the digits, so the first digit will be down a bit. > > > > But how long is that list? After sorting, if you loop through using the > "repeat for each..." variant and exit accordingly, I cannot imagine that it > would take more than an instant to find the first digital char. Old > fashioned but trusty. > > > I have done binary searches, splitting data in halves as you go so that you > cut down processing time, mainly finding stuff in long HC datasets. > > > Craig Newman > > > > > > > -----Original Message----- > > From: Tiemo Hollmann TB <[email protected]> > To: 'How to use LiveCode' <[email protected]> > Sent: Thu, Jan 31, 2013 11:54 am > Subject: to find the first numeric line? > > > Hello, > > I have a list with alphanumeric and numeric content. After sorting numeric > I would like to find the first line with a numeric first char. (the non > numeric lines before can contain also numeric chars). I would like to have > a kind of lineoffset(isNumber(first char.),list,), but that's not prebuilt. > > What would be the fastest or most straight forward way to look up such a > list? Just looping through? Testing the first char every half of the list > in a loop? Or is there a function I don't think of? > > Thanks for any pointers > > Tiemo > > > > > > > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your > subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > > > _______________________________________________ > use-livecode mailing list > [email protected] > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
