> Your code is equivalent > to this : > > ------------------------------------ > function! Outer() > let outer_var = 0 > call Inner() > echo outer_var > endfunction > > function! Inner() > let outer_var += 1 > endfunction > > call Outer() > -------------------------------------
Except that the Inner function is defined before calling Outer, not during the call of Outer. It might help to realise that in Vim, 'function' is a command that defines a function in global scope (or script scope sometimes). You can run this command whenver you like to define a function, and it always does the same thing. It is NOT a program syntactical construct that defines a function at the point where it is placed in the code. Ben. Send instant messages to your online friends http://au.messenger.yahoo.com --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---