Ocaml secrets

From: Norman Ramsey (nr@eecs.harvard.edu)
Date: Wed Jan 12 2000 - 16:31:22 MET

  • Next message: STARYNKEVITCH Basile: "Q: camlp4 use?"

    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

      tm.Unix.tm_hour

    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

    Norman

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



    This archive was generated by hypermail 2b29 : Wed Jan 12 2000 - 18:36:25 MET