English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] Array.make
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-01-04 (13:35)
From: Xavier Leroy <xavier.leroy@i...>
Subject: Re: [Caml-list] Array.make
> According to the documentation (in 3.01 at least),
> Array.make n a
> raises an exception when n = 0.  Why?  It looks like an unnecessary
> special case.  The damned hysterical raisins again?

That was a documentation error, which was fixed in 3.02.  The case n = 0
works fine and returns a zero-sized array as expected.

> BTW, the documentation also doesn't say how Array.init behaves in this
> respect. 

Like Array.make, but you're correct that this should be written
explicitly in the doc.

- Xavier Leroy
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr