Version française
Home     About     Download     Resources     Contact us    
Browse thread
OCaml Documentation Request
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Doligez <damien.doligez@i...>
Subject: Re: [Caml-list] OCaml Documentation Request
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