problem with counting words
Dick Kriesel
dick.kriesel at mail.com
Thu Oct 16 05:54:10 EDT 2014
On Oct 14, 2014, at 12:45 PM, Richard Gaskin <ambassador at fourthworld.com> wrote:
> on mouseUp
> put 1000 into n
> put "aaa,bbb,ccc#ddd#eee#fff,ggg,hhh" into tSomeData
> --
> put the millisecs into t
> repeat n
> get nDepth(tSomeData, 3, comma, 2, "#" )
> end repeat
> put the millisecs - t into t1
> put t1/n &cr& it
> end mouseUp
>
> function nDepth
> get param(1)
> repeat with i = 2 to paramCount() step 2
> set the itemDel to param(i+1)
> get item param(i) of it
> end repeat
> return it
> end nDepth
That causes an execution error at line 16 when i = 6, and it tries to set the itemDel to empty.
After changing
repeat with i = 2 to paramCount() step 2
to
repeat with i = 2 to paramCount()-1 step 2
it works.
-- Dick
More information about the use-livecode
mailing list