Tony Mechelynck wrote:
> On 23/06/08 18:40, Ben Schmidt wrote:
>> While working on the Float printing function, I also noted an odd Vim
>> behaviour: it won't let you assign a Float to a variable that was
>> previously a Number, and vice-versa. Or for that matter, it won't let
>> you change the type of a variable at all with an assignment.
> [...]
> 
> This is documented, see ":help E706"

Yes, I realise that. I am questioning whether this is necessary:

(1) for floats
(2) at all

To me, it seems not. At the very least, it shouldn't matter for floats,
so String, Number and Float could be considered equivalent. Then things
like

let x = str2float(x)

and

let x = x + 0.0

would work.

But I don't see why the restriction need be in place for any of the
datatypes (unless we enjoy frustrating scriptwriters for no reason!).

Grins,

Ben.



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui