> The below script, when executed with "so %", gives error "E117: unknown
> function III".
> Is there any way to remedy this (given that the same script, running as
> "vim9script" runs w/o error)?
> As a side note: the functions below are part of my .vimrc; so I'm having
> trouble flagging the whole file as "vim9script"...
> =======================
> def III(hx: string): string
> return hx
> enddef
>
> def DDD(hx: string): string
> return hx
> enddef
>
> def SSS()
> echo III("HALA")
> echo DDD("HULU")
> enddef
>
> call SSS()
> =======================
It would work best to put "vim9script" in the first line. But if you
don't want that, prefix "g:" to the function names in SSS(). Since this
is a legacy script, functions are defined in the global namespace by
default. But in a :def function prefixing "g:" is required for using a
global function.
--
BROTHER MAYNARD: Armaments Chapter Two Verses Nine to Twenty One.
ANOTHER MONK: And St. Attila raised his hand grenade up on high saying "O
Lord bless this thy hand grenade that with it thou mayest
blow thine enemies to tiny bits, in thy mercy. "and the Lord
did grin and people did feast upon the lambs and sloths and
carp and anchovies and orang-utans and breakfast cereals and
fruit bats and...
BROTHER MAYNARD: Skip a bit brother ...
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
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/20220823185519.521651C0D30%40moolenaar.net.