[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Pierre Weis <weis@p...> |
| Subject: | Re: Break |
> 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