Ernie Rael wrote:

> Doing
> 
>     def T()
>     enddef
>     echo T->get('name')
>     echo T
>     finish
> 
> produces this output
> 
>     <80><fd>R34_T
>     <SNR>34_T
> 
> Is this expected? I just saw `T->get('name') and thought I could
> use it to replace a spot where I'm extracting the name from `string(T)`.

I get: 

        E121: Undefined variable: T
        E121: Undefined variable: T

When I prepend "vim9script" then I do get the output you mention.

The output looks OK, you get the internal name of a script-local
function.  Either the byte-code version or the printable version with
<SNR>.  Note that you can also get the printable version with:

     echo function('T')->get('name')


-- 
A child of 5 could understand this.  Fetch me a child of 5!

 /// 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/20230318202913.9CDDD1C14CB%40moolenaar.net.

Raspunde prin e-mail lui