For Each Anomaly

Richard Gaskin ambassador at
Tue Jun 19 10:51:49 EDT 2007

Eric Chatonet wrote:

> Using repeat for each *must not* modify the variable used:
> Here tPerson is modified when running:
>    repeat for each line tPerson in tpeople
>      put "s" after tPerson
>      put tPerson & return after holder
>    end repeat
> This leads to unexpected results.
> Instead try:
>    repeat for each line tPerson in tpeople
>      put tPerson & "s" & cr after holder
>    end repeat
> And this will work as expected :-)
> Le 19 juin 07 à 16:16, Michael Kann a écrit :
>> This seems urgent enough to send out an alert. If you
>> use the "for each" loop to manipulate text this bug
>> will be of interest.

The behavior is as described in the docs (see the Dictionary entry for 

Please consider closing the "bug" report.  Somewhere between a fourth 
and a third of all entries in Bugzilla are noise, either reports 
submitted in error, or duplicates of other reports, or similar 
misunderstandings.  The larger BZ is the harder it gets to wade through. 

  Richard Gaskin
  Managing Editor, revJournal
  Rev tips, tutorials and more:

More information about the Use-livecode mailing list