PR#4941: Documentation of ==

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@9502 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Xavier Leroy 2009-12-30 14:52:05 +00:00
parent 818c9a0742
commit 44ef12ca01
1 changed files with 5 additions and 3 deletions

View File

@ -100,9 +100,11 @@ val max : 'a -> 'a -> 'a
external ( == ) : 'a -> 'a -> bool = "%eq"
(** [e1 == e2] tests for physical equality of [e1] and [e2].
On mutable structures, [e1 == e2] is true if and only if
physical modification of [e1] also affects [e2].
On non-mutable structures, the behavior of [(==)] is
On mutable types such as references, arrays, strings, records with
mutable fields and objects with mutable instance variables,
[e1 == e2] is true if and only if physical modification of [e1]
also affects [e2].
On non-mutable types, the behavior of [(==)] is
implementation-dependent; however, it is guaranteed that
[e1 == e2] implies [compare e1 e2 = 0]. *)