goofy question about "repeat for each"
Klaus major-k
klaus at major-k.de
Mon Mar 25 15:56:45 EDT 2019
Hi jbv,
> Am 25.03.2019 um 20:31 schrieb jbv via use-livecode <use-livecode at lists.runrev.com>:
>
> 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 ?
in my experience only j gets modified "temporarily".
After the loop cc = exactly as before the loop!
If that is what you mean.
> I'm asking because it seems that I am facing some
> weird and unexpected modifications in the variable
> with a huge number of lines...
I avoid modifying j at all in my scripts and never had
any problems with very large amounts of lines.
> Thanks in advance.
> jbv
Best
Klaus
--
Klaus Major
http://www.major-k.de
klaus at major-k.de
More information about the use-livecode
mailing list