Bram Moolenaar wrote:
> I have been preparing a talk for the upcoming FISL conference in Brazil:
> http://fisl.softwarelivre.org/9.0/www/
>
> One of the items I planned to discuss is why Vim has no floating point
> support.  Well, this turned into actually implementing it.
>
> The main problem with floating point is that the usual notation already
> has a meaning:
>
>       echo 123.456
>          123456
>
> That is because "." is the concatenation operator, and numbers are
> automatically converted to strings.
>
> I considered a few alternatives:
>
>       123,456             used for function arguments
>       float("123,456")    too verbose
>       #123.456            has a meaning after == and !=
>       $123.456            confusion with $ENV
>
> The best I could think of was &123.456.  It's a bit obscure, you need to
> get used to it.  But it works.
>
>        echo &123.456e-3
>           0.123456
>
> Feel free to suggest something better, but make sure it doesn't already
> mean something in any context in Vim script.
>
> Have fun with the patch!
>   
<snip>

Thank you, Bram!  I've occasionally wishes for some floating point 
support (such as for Mines in computing the winning percentage).  Might 
be able to handle that LargeFile stuff better (I'll have to think about 
that), too.

Regards,
Chip Campbell


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

Raspunde prin e-mail lui