Hello,

The following test script gives an error in vim6.2 when it is
sourced:

function TestFor()
  if exists(":for")
    " v:version >= 700
    let l:test = []
    for word in ["hello", "world"]
      call add(l:test, word)
    endfor
    return join(l:test)
  else
    return "hello world"
  endif
endfunction

I wanted to use the exists clause to fork a script according to
the current vim version, and this works in other cases.

The problem is the for-loop, it doesn't choke on something like
add() which is also new in vim7.

Am I doing something wrong, or is this a bug?

c
-- 
_B A U S T E L L E N_ lesen!  --->> <http://www.blacktrash.org/baustellen.html>

Reply via email to