[erlang-questions] string:to_float/1 behavior

Torben Hoffmann torben.lehoff@REDACTED
Thu Jan 13 10:11:58 CET 2011


If you want to find all the BIFs:

xref:start(s).
xref:add_release(s,"c:/Program\ Files/erl5.7.4/",[{builtins,true}]).
{ok,Bifs} = xref:q(s,"B").
Bifs.

Correct the path in the 2nd arg to xref:add_release/3 as appropriate.

Cheers,
Torben

On Wed, Jan 12, 2011 at 19:57, Alexey Romanov <alexey.v.romanov@REDACTED>wrote:

> Thank you!
>
> Yours, Alexey Romanov
>
>
>
> On Wed, Jan 12, 2011 at 8:20 PM, Serge Aleynikov <serge@REDACTED>
> wrote:
> > It is a BIF.  Look here:
> >
> >        emulator/beam/bif.tab
> >
> > It does handle both "." and "," cases - this is hardcoded in the
> > implementation.
> >
> > On 1/12/2011 10:11 AM, Alexey Romanov wrote:
> >>
> >> 1) Where can I find its source? It isn't defined in
> >> lib/stdlib-1.17.1/src/string.erl. I thought it must be a BIF, but "ack
> >> to_float /usr/local/lib/erlang/" doesn't seem to find anything
> >> relevant. The full output is at https://gist.github.com/776256, but 1)
> >> the only C function found is in
> >> lib/erl_interface-3.7.1/src/legacy/erl_marshal.c; 2) the Erlang code
> >> doesn't seem to define any mapping for this name.
> >>
> >> 2) The reason I went looking for its code is to check whether it is
> >> guaranteed to deal with both "." and "," as decimal separators,
> >> independent of locale? It does on my machine (with
> >> LC_NUMERIC="en_US.UTF-8") but the string module documentation doesn't
> >> say anything.
> >>
> >> Yours, Alexey Romanov
> >>
> >> ________________________________________________________________
> >> erlang-questions (at) erlang.org mailing list.
> >> See http://www.erlang.org/faq.html
> >> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
> >>
> >
> > ________________________________________________________________
> > erlang-questions (at) erlang.org mailing list.
> > See http://www.erlang.org/faq.html
> > To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
> >
> >
>
> ________________________________________________________________
> erlang-questions (at) erlang.org mailing list.
> See http://www.erlang.org/faq.html
> To unsubscribe; mailto:erlang-questions-unsubscribe@REDACTED
>
>


-- 
http://www.linkedin.com/in/torbenhoffmann


More information about the erlang-questions mailing list