Sunday, November 25, 2018

Re: str2float() issue

On Sunday, November 25, 2018 at 8:41:56 AM UTC-5, Wolf wrote:
> See help for str2float() - all
> "text after the number is silently ignored" for the second case.
>
> See help in the Variables section 1.1, under the section for conversion.
> For the first case; octal conversion happened in the first case before applying the str2float().
>
>
>
>
>
> On Sun, Nov 25, 2018 at 12:51 AM <vste...@gmail.com> wrote:
> str2float('0x1') returns 1 ( as expected )
>
> but
>
> str2float('0b1') returns 0 ( why ? )
>

I would have naively assumed the 'b' stood for binary, just as the 'x' stood for hex in the first example. As such, I would have expected both to return 1, just as the OP did.

--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: