caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: "Matej Košík" <5764c029b688c1c0d24a2e97cd764f@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] syntactic detail
Date: Wed, 8 Feb 2012 13:54:10 +0100	[thread overview]
Message-ID: <CAPFanBGE6RchhVLBCvaT8u_5HtdkhMmGWbwN9_UGSk_Mtff=yA@mail.gmail.com> (raw)
In-Reply-To: <4F326EA6.20900@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]

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 <
5764c029b688c1c0d24a2e97cd764f@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
>
>

[-- Attachment #2: Type: text/html, Size: 1786 bytes --]

  reply	other threads:[~2012-02-08 12:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 12:46 Matej Košík
2012-02-08 12:54 ` Gabriel Scherer [this message]
2012-02-08 13:09   ` David House
2012-02-08 13:39     ` oliver
2012-02-08 13:45       ` oliver
2012-02-08 13:46       ` David House
2012-02-08 13:58         ` oliver
2012-02-08 14:12           ` David House
2012-02-08 14:39             ` Gabriel Scherer
2012-02-08 14:50               ` David House
2012-02-08 15:19                 ` Vincent Aravantinos
2012-02-10  8:39                   ` Andrew
2012-02-08 16:30                 ` oliver
2012-02-10  3:37                   ` Jun Furuse
2012-02-08 16:21             ` oliver
2012-02-08 13:05 ` rixed
2012-02-09  9:05   ` Matej Košík
2012-02-09 10:56     ` Wojciech Meyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPFanBGE6RchhVLBCvaT8u_5HtdkhMmGWbwN9_UGSk_Mtff=yA@mail.gmail.com' \
    --to=gabriel.scherer@gmail.com \
    --cc=5764c029b688c1c0d24a2e97cd764f@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).