which is faster for searching?
Jerry Jensen
jhj at jhj.com
Sat Aug 30 14:04:44 EDT 2014
On Aug 30, 2014, at 12:45 AM, FlexibleLearning.com <admin at FlexibleLearning.com> wrote:
> My stock method (and presumably the method you allude to above) is...
>
> repeat for each line L in tVar
> add 1 to x
> if <data condition on L> then put "" into line x of tVar
> end repeat
> filter tVar without empty
The dictionary says you shouldn't mess with tVar within the loop:
Pasted from the dictionary:
"Important! In any of the for each loops, you should not change the labelVariable or container in a statement inside the loop. Doing so will not cause a script error, but will almost certainly produce unexpected results".
If your method works every time, I guess the dictionary is out of date once again. I also remember a post saying that changing the labelVariable (L in this case) works OK, in spite of what the dictionary says.
???
.Jerry
More information about the use-livecode
mailing list