Hi,

Luc Hermitte schrieb am 03.12.2015 um 14:52:
> 
> I'm not sure whether sort() can be applied with 'n' parameter on lists of 
> strings that encode numbers.
> 
> Right now (v7.4-908) the result produced is: ['1', '5', '48', '25', '5', 
> '28', '6'] which is really odd.
> 
> Is this a vim bug, or an undefined behaviour?

see the fifth paragraph of ":help sort()". Note that Strings are
explicitly mentioned "to be considered as being 0". Also read the
second to last paragraph which explains why the order of the listed
items does not change.

Regards,
Jürgen


-- 
Sometimes I think the surest sign that intelligent life exists elsewhere
in the universe is that none of it has tried to contact us.     (Calvin)

-- 
-- 
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