On Mon, Mar 02, 2009 at 07:21:09AM -0800, Maxim Kim wrote:
> [...]
> E706: Variable type mismatch for: value.
> 
> So, it looks like for loop cannot iterate over composite data.
> Just tried:
> 
> let lst = ["hello", []]
> for value in lst
> endfor
> 
> Gives me the same error.
> I'd expect it to do :unlet key, :unlet value before each iteration.

I don't like this vim behaviour either. However you can work around it:

  let lst = ["hello", []]
  for value in lst
    " do stuff
    unlet value
  endfor

Marc Weber

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to