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
Can max_array_length be enlarged?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2000-05-22 (16:13)
From: Dennis (Gang) Chen <Dennis.G.Chen@m...>
Subject: Can max_array_length be enlarged?

In ocaml, the max length of array is determined by the predefined constant
max_array_length. Is it possible to build an array with length
longer than this? I noticed that this constant is defined in source code sys.ml by:

let max_array_length = (1 lsl (word_size - 10)) - 1;;

Is it safe to modify this code to set a bigger value for max_array_length?

Thank you in advance for any help on this point.

Dennis Gang CHEN    Senior Software Engineer
Motorola Australia Software Centre, Electronic Design Automation
2 Second Avenue, Mawson Lakes, SA 5095, Australia
phone: +61 8 8203 3560,  mailto: Dennis.G.Chen@motorola.com