There is no purpose, it's just an edge case of the simple lexical
specification you can find at:
  http://caml.inria.fr/pub/docs/manual-ocaml/lex.html#float-literal

Everywhere digits are allowed, you can insert extraneous underscores. There
is no restriction that there must be at least one digit for underscores to
be valid. I don't see why there should be.

On Wed, Feb 8, 2012 at 1:46 PM, Matej Košík <
5764c029b688c1c0d24a2e97cd7...@gmail.com> wrote:

> Hi,
>
> Ocaml allows me to add '_' at the end of a floating point literal, e.g.:
>
>        1._
>
> What can be a purpose for that?
>
> In case of long or Long integers, optional adding of '_' between the
> integer and 'l' or 'L' make sense ('l' is hard to discriminate from '1'
> for many fonts). But in case of floats, I am not sure.
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>

-- 
Caml-list mailing list.  Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to