You are right. The variable names in the above example should be without 
quotes MyFunction(variable1, variable2) . 
In my functions, they are without quotes.

On Wednesday, December 6, 2023 at 1:14:04 AM UTC+1 Salman Halim wrote:

> I might be nitpicking, but why are the function parameters in the function 
> definition in quotes?
>
> Salman
>
> On Tue, Dec 5, 2023, 17:14 Christian Brabandt <cbl...@256bit.org> wrote:
>
>>
>> On Di, 05 Dez 2023, rameo wrote:
>>
>> > I installed vim 9 but still have multiple functions written in old 
>> vimscript.
>> > 
>> > I've read that functions written in old vimscript still work.
>> > 
>> > However I noticed that importing variables into Python 
>> `vim.eval("a:myvariable")` no longer works
>> > 
>> > I don't always get the right values imported.
>> > 
>> > Example :
>> > 
>> > :call MyFunction("12", "14") 
>> > 
>> > function! MyFunction("variable1, variable2") 
>> > python3 << endpython 
>> > variable1 = vim.eval("a:variable1") 
>> > variable2 = vim.eval("a:variable2") 
>> > print(variable1 + " " + variable2) 
>> > endpython 
>> > 
>> > endfunction
>> > 
>> > What's wrong in above code?
>> > 
>> > Or better... why doesn't it work anymore in vim9?
>>
>> Do you get an error message? Which one? If this doesn't work anymore, 
>> when did it stop working?
>>
>> Thanks,
>> Christian
>> -- 
>> Driver does not carry cash.
>>
>> -- 
>> -- 
>> 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+u...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/vim_use/ZW%2Bgsu3Q23sAczgm%40256bit.org
>> .
>>
>

-- 
-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_use/e4c19d3a-eb3e-472b-9360-cdd4440c02f5n%40googlegroups.com.

Reply via email to