Ken Takata wrote:

> 2016/7/16 Sat 21:21:11 UTC+9 Bram Moolenaar wrote:
> > Ken Takata wrote:
> > 
> > > The help of type() says:
> > > 
> > >           To avoid the magic numbers it should be used this way: >
> > >                   :if type(myvar) == type(0)
> > >                   :if type(myvar) == type("")
> > >                   :if type(myvar) == type(function("tr"))
> > >                   :if type(myvar) == type([])
> > >                   :if type(myvar) == type({})
> > >                   :if type(myvar) == type(0.0)
> > >                   :if type(myvar) == type(v:false)
> > >                   :if type(myvar) == type(v:none)
> > > 
> > > But I don't think this is easy to understand. More badly, we don't have a 
> > > way
> > > to get the constants for Job and Channel; we need to use the magic 
> > > numbers for
> > > them. Attached patch adds constants for them:
> > >   v:t_number, v:t_string, ..., v:t_job and v:t_channel
> > > 
> > > What do you think?
> > 
> > I like it.
> 
> Here is an updated patch for the latest code.

Thanks!

-- 
Futility Factor: No experiment is ever a complete failure - it can always
serve as a negative example.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui