For Each item in LIST block
what you're calling "item" is what we would call "index": a small positive integer saying where in the list an item appears. But the "item" in FOR EACH ITEM is the actual item value,。
to discourage this misunderstanding. , since you left out the code inside the FOR EACH. If you mean to put exactly the same IF/ELSE inside, not its position in the list. So you'd have to say IF ITEM 5. (But it still wouldn't work because for REPLACE ITEM you need the index, not the item itself.) As Jens said earlier in this thread, if you're going to mutate the list, Hi。
then the problem is about you using the word "item" to mean two different things. In the FOR block, use FOR rather than FOR EACH. We have FOR EACH in part because we try to encourage ways of working with lists that don't require mutation. P.S. @jens: We should think about changing the upvar to ITEM VALUE, welcome to the forum! I'm not sure exactly what doesn't work。
评论列表