@yegappanl

The only command I see I can prefix with "vim9cmd" is "call SSS()" (the 
others already are vim9 functions), to become "vim9cmd SSS()". 
This however gives me error "E117: unknown function SSS" (instead of 
"III"). 

Prefixing the vim9(!) function III with "vim9cmd" actually works but makes 
- from my point of view - no sense at all (why would I need to flag a vim9 
function as vim9 function if that's clear from its definition?)

Can you (or anybody) shed some light on this?

Info: I'm using the 9.0.242

On Tuesday, August 23, 2022 at 6:25:51 PM UTC+2 [email protected] wrote:

> Hi,
>
> You need to prefix the command with ":vim9cmd"
>
> - Yegappan
>
> On Tue, Aug 23, 2022 at 9:18 AM '[email protected]' via vim_dev
> <[email protected]> wrote:
> >
> > 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()
> > =======================
> >
> > --
> > --
> > 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/5d99e83d-eef6-40c0-b878-03d2012b638an%40googlegroups.com
> .
>

-- 
-- 
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/b95eb6c6-f509-44ee-a1ac-a209306a52dfn%40googlegroups.com.

Raspunde prin e-mail lui