to find the first numeric line?

dunbarx at aol.com dunbarx at aol.com
Fri Feb 1 15:58:11 EST 2013


Jim.


This is very cute. Almost Jacque-like.



But there is a problem in that much, if not all of his data is both alpha and numeric, like "A2"



So filtering will not eliminate those lines that contain strings in that form.




Craig


-----Original Message-----
From: Jim Lambert <jiml at netrin.com>
To: use-livecode <use-livecode at lists.runrev.com>
Sent: Fri, Feb 1, 2013 1:24 pm
Subject: Re: to find the first numeric line?


Mark wrote:

> have you taken a look at the FILTER command?
> filter list with "[1-9]*"

That is a possible approach, like this:

function getNumericLineStart temp
   put the number of lines of temp into totalLines
   sort numeric temp
   filter temp with "[1-9]*"
   put the number of lines of temp into totalLinesNumericStart
   return totalLines-totalLinesNumericStart
end getNumericLineStart

Not sure if this is any speedier than a repeat loop.

Jim Lambert

_______________________________________________
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