Matt Wozniski wrote:

> function! ReturnArgs(...)
>   return a:000
> endfunction
> 
> " Seems to work fine?
> echo ReturnArgs(1, 2, 3)
> 
> " SEGV
> echo string(ReturnArgs(1, 2, 3))
> 
> function! MakeArgsDict(...)
>   return { 'args': a:000 }
> endfunction
> 
> " E685 Internal Error
> echo MakeArgsDict(1, 2, 3)
> 
> " SEGV
> echo string(MakeArgsDict(1, 2, 3))

For it crashes a while after trying these things.  Most likely the
reference count for a:000 is wrong.  Never thought of someone returning
it...

-- 
MONK: ... and the Lord spake, saying, "First shalt thou take out the Holy Pin,
      then shalt thou count to three, no more, no less.  Three shalt be the
      number thou shalt count, and the number of the counting shalt be three.
      Four shalt thou not count, neither count thou two, excepting that thou
      then proceed to three.  Five is right out.  Once the number three, being
      the third number, be reached, then lobbest thou thy Holy Hand Grenade of
      Antioch towards thou foe, who being naughty in my sight, shall snuff it.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

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

Raspunde prin e-mail lui