cc does not change. j only changes in each iteration when you add 1 to item 1
of j. Next iteration j will be set to the next line in cc.
LC History: It used to be when repeat for each was first implemented, you were
playing with fire to change the content of either cc or j, as the repeat for
e
My mistake. Thanks for the correction.
.Jerry
> On Mar 25, 2019, at 7:11 PM, hh via use-livecode
> wrote:
>
>> Jerry J. wrote:
>> "Starting in version 7.0 it is possible to modify the container
>> variable inside a for each loop without affecting the iterations
>> of the loop."
>>
>>> jbv wrot
> Jerry J. wrote:
> "Starting in version 7.0 it is possible to modify the container
> variable inside a for each loop without affecting the iterations
> of the loop."
>
>> jbv wrote:
>> repeat for each line j in cc
>> add 1 to item 1 of j
>> put return & j after var2
>> end repeat
You can't c
Hi jbv,
What version of LC are you using? Here’s a quote from the LC 8.1.10 dictionary:
“Starting in version 7.0 it is possible to modify the container variable inside
a for each loop without affecting the iterations of the loop.”
Could this be biting you?
.Jerry
> On Mar 25, 2019, at 2:44 PM, jb
Hi jbv,
you don't even need IT! :-)
> Am 25.03.2019 um 22:44 schrieb jbv via use-livecode
> :
>
> 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 & "," & ite
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...
bad vision. sorry
--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org
On Mon, Mar 25, 2019 at 1:42 PM Klaus major-k via use-livecode <
use-livecode@lists.runrev.com> wrote:
> Hi Stephen,
>
> > Am 25.03.2019 um 21:31 schrieb Stephen Barncard via use-livecode <
> use-livecode@lists.runrev.com
Hi Stephen,
> Am 25.03.2019 um 21:31 schrieb Stephen Barncard via use-livecode
> :
>
> what is the 'item-delimiter" in this case? I don't see commas
the COMMA is the default itemdelimiter, so not neccessary to set it in this
example.
> --
> Stephen Barncard - Sebastopol Ca. USA -
> mixstream
what is the 'item-delimiter" in this case? I don't see commas
--
Stephen Barncard - Sebastopol Ca. USA -
mixstream.org
On Mon, Mar 25, 2019 at 12:31 PM jbv via use-livecode <
use-livecode@lists.runrev.com> wrote:
> Hi list,
>
> I have a list of values such as :
>540,20
>542,22...
> one
Klaus is correct...
cc is not modified by changing j
I just did a quick test to verify.
Thanks,
Brian
On Mar 25, 2019, 3:31 PM -0400, jbv via use-livecode
, wrote:
> 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
Hi jbv,
> Am 25.03.2019 um 20:31 schrieb jbv via use-livecode
> :
>
> 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 retu
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
chang
12 matches
Mail list logo