From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id ACD50BB9C for ; Mon, 19 Sep 2005 13:31:59 +0200 (CEST) Received: from [IPv6:::1] (yquem.inria.fr [128.93.8.37]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j8JBVxJm006574 for ; Mon, 19 Sep 2005 13:31:59 +0200 Mime-Version: 1.0 (Apple Message framework v733) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <2BC1EB80-3703-4F99-94C7-DBFBBC721CFE@inria.fr> Content-Transfer-Encoding: 7bit From: Damien Doligez Subject: Re: [Caml-list] OCaml Documentation Request Date: Mon, 19 Sep 2005 13:32:05 +0200 To: caml-list X-Mailer: Apple Mail (2.733) X-Miltered: at concorde with ID 432EA1AF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; damien:01 damien:01 caml-list:01 ocaml:01 val:01 initialized:01 integers:01 2005,:98 wrote:01 doligez:01 doligez:01 int:01 int:01 argument:01 element:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Sep 18, 2005, at 16:28, Thomas Fischbacher wrote: > The Array.init and Array.make documentation says more or less the > same: > > ====> > << > val init : int -> (int -> 'a) -> 'a array > >>> >>> > > Array.init n f returns a fresh array of length n, > with element > number i initialized to the result of f i. In other > terms, > Array.init n f tabulates the results of f applied > to the > integers 0 to n-1. > Raise Invalid_argument if n < 0 or n > > Sys.max_array_length. If > the return type of f is float, then the maximum > size is only > Sys.max_array_length / 2. > <==== > > Question: Is the statement about array max lengths accurate for 64-bit > systems as well? The last statement is false in theory, but in practice Sys.max_array_length and Sys.max_array_length/2 are both quasi-infinite on a 64-bit system. -- Damien