Dnia Wednesday 09 of April 2008, Bram Moolenaar napisaĆ:
>
> Now the patch is attached, hopefully that works better.
Thanks, this one is working.
One bug:
:echo 1.90+&90
280,000000
:echo 1.90-&90
100,000000
OK, but
:echo 1.90*&90
E806: using Float as a String
E15: Illegal expression: 1.90*&90
:echo 1.90/&90
E806: using Float as a String
E15: Illegal expression: 1.90/&90
These two:
:echo &1.90*&90
:echo &1.90/&90
Work.
What about slightly more verbose solution?
Make float() not reduced to one variable but as "environment" where
*all* variables are treated as float but outside of that are treated as
strings. Example:
:let a = float("2/4")
:echo a
0.5
:let b = a . "+5"
:echo b
0.5+5
:let c = float(a . "+5")
:echo c
5.5
m.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---