goofy question about "repeat for each"
jbv at souslelogo.com
jbv at souslelogo.com
Mon Mar 25 17:44:19 EDT 2019
Hi again,
I finally solved the problem by modifying the loop
as follows :
repeat for each line j in cc
get item 1 of j
add 1 to it
put return & it & "," & item 2 of j after var2
end repeat
But I still don't understand why the previous version
led to unexpected values...
Le 2019-03-25 15:31, jbv via use-livecode a crit :
> Hi list,
>
> I have a list of values such as :
> 540,20
> 542,22...
> one per line in a variable named cc.
>
> Now I'm running the following loop :
> repeat for each line j in cc
> add 1 to item 1 of j
> put return & j after var2
> end repeat
>
> goofy question : does each iteration of the loop
> change the values of each line of cc, or does it
> only change the value of j ?
>
> I'm asking because it seems that I am facing some
> weird and unexpected modifications in the variable
> with a huge number of lines...
>
> Thanks in advance.
> jbv
>
> _______________________________________________
> 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