On Jul 21, 12:01 pm, Ben Fritz <[email protected]> wrote:
>
> I need to stop trying to multitask before I make myself look like more
> of an idiot.
>
> [snip]
>
> Zero evaluates as false and a
> non-empty string evaluates as true, so just check the value before you
> use it.
>
> You'll need an additional "return 0" within your catch, but the rest
> of the function should "just work".

Ugh, so much for the "not looking like an idiot".

This would work, except:

a) In Vim, unlike Perl, apparently non-null strings DON'T evaluate to
true (is this documented anywhere? I can't find it if it is!)
b) you weren't returning a string anyway.

Returning 0 should still work, but check that type(project) == type
({}) for your sentinal, rather than checking for true/false of the
value itself.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to