Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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-12 (17:32)
From: Norman Ramsey <nr@e...>
Subject: Ocaml secrets
I've been going nuts copying record-type definitions, and then Benjamin Pierce
showed me a trick.

Please tell me where in the OCaml manual I could have discovered
the ability to write


as in

        let tm = Unix.localtime (Unix.time()) in
        sprintf "%02d:%02d:%02d " tm.Unix.tm_hour tm.Unix.tm_min tm.Unix.tm_sec


P.S.  just writing let tm = ... in ... tm.tm_hour ... etc causes ocamlc to barf.