caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Radu Grigore <radugrigore@gmail.com>
To: caml-list@pauillac.inria.fr
Subject: Re: Baffeld by manual (Was: [Caml-list] baffled by semicolon)
Date: Mon, 30 Aug 2004 11:23:24 +0300	[thread overview]
Message-ID: <7f8e92aa0408300123684481da@mail.gmail.com> (raw)
In-Reply-To: <1093853217.9955.44.camel@pelican.wigram>

On 30 Aug 2004 18:06:58 +1000, skaller <skaller@users.sourceforge.net> wrote:

> The single ; is (usually) left associative binary sequencing
> operator of type unit that takes two expressions of
> type unit as an argument:

Only the left argument should be unit (otherwise a warning is emitted
since the result is silently ignored). The result of "e1; e2" is
(except side effects) the same as the result of e2. So something like
this:

(); (); (); 1;;

is perfectly legal and safe. The expression:

1; 2;;

Gives a warning since the result of the first expression is ignored
implicitely. To silence the warning you write:

ignore (1); 2;;

i.e., you ignore it explicitely.

regards,
radu

-------------------
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


  reply	other threads:[~2004-08-30  8:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-26  3:22 [Caml-list] baffled by semicolon briand
2004-08-26  3:30 ` David Brown
2004-08-26  4:18 ` Alex Valdez
2004-08-26  5:05   ` briand
2004-08-29  4:45     ` William Lovas
2004-08-30  7:12 ` Baffeld by manual (Was: [Caml-list] baffled by semicolon) Florian Hars
2004-08-30  8:06   ` skaller
2004-08-30  8:23     ` Radu Grigore [this message]
2004-08-30  8:25     ` Ville-Pertti Keinonen
2004-08-30 11:07       ` skaller

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=7f8e92aa0408300123684481da@mail.gmail.com \
    --to=radugrigore@gmail.com \
    --cc=caml-list@pauillac.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).