Tuesday, July 4, 2023

Re: vim9 Equivalence of __FILE__, __LINE__, and __FUNCTION__ usage in C++

On 2023-07-04, Nicolas <nivaemail@gmail.com> wrote:
> Hi Life,
>
> My Main goal is to add prefix of vim9script current '__FUNCTION__' to my
> debug message.

Something along these lines, perhaps?

vim9script

def Debug(F: func)
echo string(F)
enddef

def Foo()
Debug(Foo)
enddef

def Bar()
Foo()
Debug(Bar)
enddef

Bar()

I don't think Vim 9 script has the kind of introspection you are asking
for.

Life.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/u820gq%245pn%242%40ciao.gmane.io.

No comments:

Post a Comment