summaryrefslogtreecommitdiffstats
path: root/stdlib/array.mli
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>1997-09-11 15:10:23 +0000
committerDamien Doligez <damien.doligez-inria.fr>1997-09-11 15:10:23 +0000
commitc44e6f999a4b06a4b0e961e8607ab8c557501a57 (patch)
tree3255033ee7995334288ca1ed7cd17d2b1de45451 /stdlib/array.mli
parent1d41f4abb025864b1aee444790b613cc5f0a444a (diff)
arg.ml, arg.mli, string.mli: amelioration de la doc
array.mli, array.ml, random.ml: create -> make (coherence avec String) sys.ml, sys.mli: ajout max_string_length, max_array_length git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@1706 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/array.mli')
-rw-r--r--stdlib/array.mli6
1 files changed, 4 insertions, 2 deletions
diff --git a/stdlib/array.mli b/stdlib/array.mli
index 343565f5a..3815161f7 100644
--- a/stdlib/array.mli
+++ b/stdlib/array.mli
@@ -28,16 +28,18 @@ external set: 'a array -> int -> 'a -> unit = "%array_safe_set"
Raise [Invalid_argument "Array.set"] if [n] is outside the range
0 to [Array.length a - 1].
You can also write [a.(n) <- x] instead of [Array.set a n x]. *)
+external make: int -> 'a -> 'a array = "make_vect"
external create: int -> 'a -> 'a array = "make_vect"
- (* [Array.create n x] returns a fresh array of length [n],
+ (* [Array.make n x] returns a fresh array of length [n],
initialized with [x].
All the elements of this new array are initially
physically equal to [x] (in the sense of the [==] predicate).
Consequently, if [x] is mutable, it is shared among all elements
of the array, and modifying [x] through one of the array entries
will modify all other entries at the same time. *)
+val make_matrix: int -> int -> 'a -> 'a array array
val create_matrix: int -> int -> 'a -> 'a array array
- (* [Array.create_matrix dimx dimy e] returns a two-dimensional array
+ (* [Array.make_matrix dimx dimy e] returns a two-dimensional array
(an array of arrays) with first dimension [dimx] and
second dimension [dimy]. All the elements of this new matrix
are initially physically equal to [e].