From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA09108 for caml-redistribution; Tue, 25 Feb 1997 13:36:35 +0100 (MET) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA09052; Tue, 25 Feb 1997 13:34:40 +0100 (MET) From: Pierre Weis Message-Id: <199702251234.NAA09052@pauillac.inria.fr> Subject: Re: Break In-Reply-To: <199702242000.MAA28634@vegemite.Stanford.EDU> from Andrew Conway at "Feb 24, 97 12:00:53 pm" To: arc@sequence.Stanford.EDU (Andrew Conway) Date: Tue, 25 Feb 1997 13:34:39 +0100 (MET) Cc: caml-list@pauillac.inria.fr MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: weis > I would like to suggest a "new" standard exception: Pervasives.Break. There already exists a Break exception: # Sys.Break;; - : exn = Break It has another meaning, snce it is used to signal an interrupt (^C in general under Unix). # raise Sys.Break;; Interrupted. Ther is no problem to use it to exit from loops, but it could be a bit confusing. Thus, there also exists an exception devoted to premature exits from loops: # Pervasives.Exit;; - : exn = Exit you should raise the Exit exception when you want a premature end of loop. (This is also true for Caml Light.) > [ En mauvais francais ] > > Chers Utilisateurs de Caml, > > Je voudrais vous proposer un exception nouveau : Pervasives.break. Elle existe de'ja`: c'est l'exception Pervasives.Exit en Objective Caml ou Exit en Caml Light. L'exception Sys.Break (ou sys__Break) est consacre'e a` signaler les interruption venant du syste`me d'exploitation (en ge'ne'ral appui sur ^C sous Unix). Best regards, Pierre Weis INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis