Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Runtime overflow and what to do
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Maxence Guesdon <maxence.guesdon@i...>
Subject: Re: [Caml-list] Runtime overflow and what to do
On Thu, 10 Oct 2002 17:01:26 +0200
"Scott J," <jscott@planetinternet.be> wrote:

> let rec fact n = if n <= 1 then 1 else n * fact (n - 1) ;;
You can catch the Stack_overflow exception :

try fact 500000
with Stack_overflow -> -1

Is that what you want ?

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