From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA04375; Tue, 30 Apr 2002 23:58:55 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA04370 for ; Tue, 30 Apr 2002 23:58:54 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mel-rto2.wanadoo.fr (smtp-out-2.wanadoo.fr [193.252.19.254]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g3ULws525481 for ; Tue, 30 Apr 2002 23:58:54 +0200 (MET DST) Received: from mel-rta7.wanadoo.fr (193.252.19.61) by mel-rto2.wanadoo.fr (6.5.007) id 3CCED1B300023073 for caml-list@inria.fr; Tue, 30 Apr 2002 23:58:54 +0200 Received: from AlphaSystem.dnsalias.net (80.11.74.173) by mel-rta7.wanadoo.fr (6.5.007) id 3CCE53D900084FC1 for caml-list@inria.fr; Tue, 30 Apr 2002 23:58:54 +0200 Content-Type: text/plain; charset="iso-8859-1" From: Johan =?iso-8859-1?q?Balti=E9?= To: OCaml Mailing list Subject: Re: [Caml-list] Breaking out of iterative loops Date: Tue, 30 Apr 2002 23:38:31 +0200 X-Mailer: KMail [version 1.4] References: <20020430202706.GA6791@vincent> In-Reply-To: <20020430202706.GA6791@vincent> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200204302331.32905.johan.baltie@wanadoo.fr> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Le Mardi 30 Avril 2002 22:27, Vincent Foley a =E9crit : > What are the equivalents (if any) of C's 'continue' and 'break' in > O'Caml (respectively, start another iteration and quit the loop without > further processing)? Think you should look for exception handling. I do not use anything that looks like a "continue" and "break" as i gener= ally=20 avoid loop in my code and i do not think there is any. break: try for ... do raise End_Loop done with End_Loop -> continue: for ... do try raise Next_Loop with Next_Loop -> .... done But please, for my soul sake, avoid such things unless you do really need= an=20 exception --=20 Ciao Jo ------------------- 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