Re: a question about foreach construct
- Posted by jmduro Oct 16, 2015
- 1443 views
ghaberek said...
Can we modify the outer sequence from within the block?
foreach item in s do if item = something then s = append( s, new_item ) -- is this legal? end if end foreach
-Greg
s being defined outside of the block, I don't see any reason to protect it against modification.
A loop is not a routine.
Jean-Marc