caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Runtime overflow and what to do
@ 2002-10-10 15:01 Scott J,
  2002-10-10 15:07 ` Maxence Guesdon
                   ` (3 more replies)
  0 siblings, 4 replies; 38+ messages in thread
From: Scott J, @ 2002-10-10 15:01 UTC (permalink / raw)
  To: caml-list

[-- Attachment #1: Type: text/plain, Size: 370 bytes --]

Hi,


suppose I use the following code for fact

let rec fact n = if n <= 1 then 1 else n * fact (n - 1) ;;

Because an integer number is represented by a fixed number of bytes I will
get a runtime overflow if n is chosen too large.

Is there in Ocamel a workaround to cope with this problem . Something like "
Onoverflow goto .. " in imperative languages.

Thx

Scott


[-- Attachment #2: Type: text/html, Size: 1402 bytes --]

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2002-10-16  8:24 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-10 15:01 [Caml-list] Runtime overflow and what to do Scott J,
2002-10-10 15:07 ` Maxence Guesdon
2002-10-10 15:11 ` Maxence Guesdon
2002-10-10 15:21 ` Luc Maranget
2002-10-10 18:13   ` Sven LUTHER
2002-10-10 18:57     ` Xavier Leroy
2002-10-10 22:17       ` Scott J,
2002-10-11  8:00         ` Sven LUTHER
2002-10-11 10:16         ` Alessandro Baretta
2002-10-12 16:13           ` John Carr
2002-10-12 16:58             ` Sven LUTHER
2002-10-12 17:12               ` John Prevost
2002-10-13  9:31               ` Xavier Leroy
2002-10-13  9:52                 ` Sven LUTHER
2002-10-13  9:57                   ` Xavier Leroy
2002-10-13 10:15                     ` Sven LUTHER
2002-10-13 13:25                   ` John Carr
2002-10-13  9:28             ` Xavier Leroy
2002-10-14  0:56               ` Chris Hecker
2002-10-14  9:46                 ` Jacques Garrigue
2002-10-14 11:02                   ` Scott J,
2002-10-14 14:05                   ` Tim Freeman
2002-10-14 15:32                     ` Stefano Zacchiroli
2002-10-14 16:12                       ` Alain Frisch
2002-10-14 16:49                   ` [Caml-list] new ocaml switches (was Re: Runtime overflow and what to do) Chris Hecker
2002-10-13  9:25         ` [Caml-list] Runtime overflow and what to do Xavier Leroy
2002-10-13 10:04           ` Daniel de Rauglaudre
2002-10-13 10:29             ` Pierre Weis
2002-10-13 10:47               ` Daniel de Rauglaudre
2002-10-13 12:38                 ` Pierre Weis
2002-10-13 16:14               ` Xavier Leroy
2002-10-13 17:06                 ` Michel Quercia
2002-10-15 19:15                 ` Pierre Weis
2002-10-15 19:25                   ` Xavier Leroy
2002-10-16  8:24                     ` Pierre Weis
2002-10-13 10:19           ` Pierre Weis
2002-10-11  8:02       ` Sven LUTHER
2002-10-11  6:42 ` Florian Hars

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).