caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Jonathan Roewen" <jonathan.roewen@gmail.com>
To: oliver@first.in-berlin.de
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Arg-module: Float-Args also accept integer values
Date: Tue, 08 Aug 2006 20:30:37 -0700 (PDT)	[thread overview]
Message-ID: <78403809480-BeMail@beos> (raw)
In-Reply-To: <78109874304-BeMail@beos>

> > ===========================================
> > first:~ oliver$ ocaml
> >         Objective Caml version 3.09.2
> > 
> > # let floatingpoint_id (x:float) = x;;
> > val floatingpoint_id : float -> float = <fun>
> > # floatingpoint_id 42;;
> > This expression has type int but is here used with type float
> > # 
> > ===========================================
> 
> float_of_string doesn't use the ocaml type system ;-) Don't know 
> about 
> impl details, but it's basically like atof (or whatever it's called) 
> in 
> standard C libs. The two are completely separate.

Oops, I should clarify: float_of_string doesn't use the ocaml lexing 
tools that are used in the toplevel, and the compilers themselves. 
That's why it parses integers.

Jonathan


  reply	other threads:[~2006-08-09  3:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-08 20:57 Oliver Bandel
2006-08-08 21:19 ` [Caml-list] " William D. Neumann
2006-08-08 21:33   ` Oliver Bandel
2006-08-08 21:40     ` Sachin Shah
2006-08-08 22:12       ` Oliver Bandel
2006-08-09  3:25         ` Jonathan Roewen
2006-08-09  3:30           ` Jonathan Roewen [this message]
2006-08-09  5:54           ` Oliver Bandel
2006-08-09  6:13             ` Jonathan Roewen

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=78403809480-BeMail@beos \
    --to=jonathan.roewen@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=oliver@first.in-berlin.de \
    /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).