caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Norman Ramsey <nr@eecs.harvard.edu>
To: caml-list@inria.fr
Subject: Ocaml secrets
Date: Wed, 12 Jan 2000 10:31:22 -0500 (EST)	[thread overview]
Message-ID: <200001121531.KAA30840@wally.eecs.harvard.edu> (raw)

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.




             reply	other threads:[~2000-01-12 17:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-12 15:31 Norman Ramsey [this message]
2000-01-12 17:56 ` David Brown
2000-01-12 22:35 ` Francois Rouaix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200001121531.KAA30840@wally.eecs.harvard.edu \
    --to=nr@eecs.harvard.edu \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).