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
Ocaml secrets
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-01-13 (16:25)
From: Francois Rouaix <frouaix@l...>
Subject: Re: Ocaml secrets
> Please tell me where in the OCaml manual I could have discovered
> the ability to write
>   tm.Unix.tm_hour

Well, the online manual says

    label ::= label-name
           |  module-path .  lowercase-ident

at http://pauillac.inria.fr/ocaml/htmlman/manual009.html

and expr ::= ... | expr.label
at http://pauillac.inria.fr/ocaml/htmlman/manual013.html

I'd say it's a matter of faith in the regularity of the compiler (or 
its authors, hi guys, how are you) ;-)
Since we know that a language object (except modules and weird things like
method names) always lives in some module, and since we know that we can use 
M.x to access value x in module M, we should expect M.l to be valid to refer
to label l in module M.