That  works fine. Thank you.

On Monday, February 15, 2021 at 11:50:27 PM UTC+9 lacygoill wrote:

> There might be a better way, but in the meantime, try this:
>
> if exists(':def') != 2
>     fu Add(x, y) abort
>
>
>         return a:x + a:y
>
>
>     endfuelse
>     fu DefineAdd() abort
>         def Add(x: number, y: number): number
>             return x + y
>         enddef
>     endfu
>     call DefineAdd()endif
> echo Add(3, 5)
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub 
> <https://github.com/vim/vim/issues/7851#issuecomment-779269891>, or 
> unsubscribe 
> <https://github.com/notifications/unsubscribe-auth/ACY5DGDGNXQZB6E32FDB4QLS7EYC5ANCNFSM4XUZDU4Q>
> .
>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/e3db29fb-7ed9-40e3-8f1f-baf576e74b6dn%40googlegroups.com.

Raspunde prin e-mail lui