view ci/if_ver-cmd.vim @ 22655:eabe2c1444ea v8.2.1876

patch 8.2.1876: Vim9: argument types are not checked at compile time Commit: https://github.com/vim/vim/commit/94738d8fab09c5563e1512f1695e047c715ad274 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Oct 21 14:25:07 2020 +0200 patch 8.2.1876: Vim9: argument types are not checked at compile time Problem: Vim9: argument types for builtin functions are not checked at compile time. Solution: Add an argument type checking mechanism. Implement type checks for one function.
author Bram Moolenaar <Bram@vim.org>
date Wed, 21 Oct 2020 14:30:04 +0200
parents 27ff44268da5
children
line wrap: on
line source

" Provide 'PrintVer' command to print the interface versions.

func s:print_ver(lang, ...)
  if has(a:lang)
    exec a:lang join(a:000)
  else
    echo 'N/A'
  endif
  echo ''
endfunc

command -nargs=+ PrintVer call <SID>print_ver(<f-args>)