English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] naming parts of optional arguments?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-03-28 (02:15)
From: Chris Hecker <checker@d...>
Subject: Re: [Caml-list] naming parts of optional arguments?

James replied off list, but I thought the others might like to see it:

At 17:35 3/27/2003 -0800, james woodyatt wrote:
># let f ?xy:(x,y as xy = 0.0,0.0) () = xy;;
>val f : ?xy:float * float -> unit -> float * float = <fun>

Ah, that's what I wanted, thanks!  It looks like you can just do ?xy:(x,y = 
0,0) and skip the "as xy" too.  Wacky syntax...it looks like I should have 
looked in the pseudo-bnf before posting since it looks like this is in there.


To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners