Re: why here a int and not a float ?
| Newsgroups | gmane.comp.lang.ocaml.beginners |
|---|---|
| Message-ID | <[email protected]> |
>
> I know that and according to the page you linked to * is Always a int.
> But my question stays. How can I tell Ocaml when I make a function that
> it has to use floats instead of int.
>
You can use * for int and *. for float.
Actualy, each function for int exists for float by adding a « . » to the
operator.
Take a look in pervasives[1] for the list.
[1] http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html
------------------------------------
------------------------------------
Archives up to December 31, 2011 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners
The archives of the very official ocaml list (the seniors' one) can be found at http://caml.inria.fr
Attachments are banned and you're asked to be polite, avoid flames etc.
------------------------------------
Yahoo Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ocaml_beginners/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ocaml_beginners/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/