From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA10015 for caml-redistribution; Tue, 9 Feb 1999 09:45:33 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA24618 for ; Mon, 8 Feb 1999 21:14:55 +0100 (MET) Received: from miss.wu-wien.ac.at (miss.wu-wien.ac.at [137.208.107.17]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id VAA09775 for ; Mon, 8 Feb 1999 21:14:53 +0100 (MET) Received: (from mottl@localhost) by miss.wu-wien.ac.at (8.9.0/8.9.0) id VAA24823 for caml-list@inria.fr; Mon, 8 Feb 1999 21:14:48 +0100 (MET) From: Markus Mottl Message-Id: <199902082014.VAA24823@miss.wu-wien.ac.at> Subject: "while" with condition at end? To: caml-list@inria.fr (OCAML) Date: Mon, 8 Feb 1999 21:14:47 +0100 (MET) X-Mailer: ELM [version 2.4 PL21] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: weis Hello! I have just found out that there is no loop construct that checks the termination condition at the end of the block. Is there some special reason to this? I'd like to write something like e.g. do (); ...; while (some_condition); The only work-around is to either double the code and execute it once before a "normal" while-loop (not elegant). The other option is to put the block into a unit-function (a bit less efficient) and use it once before and than in the loop (also not very elegant). A construct of this kind would probably make the imperative features more complete. Best regards, Markus Mottl -- Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl