Documentation plus precise
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5050 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02master
parent
b4f0329f4e
commit
8bf3b5a36a
|
@ -48,13 +48,12 @@ external ( = ) : 'a -> 'a -> bool = "%equal"
|
||||||
Mutable structures (e.g. references and arrays) are equal
|
Mutable structures (e.g. references and arrays) are equal
|
||||||
if and only if their current contents are structurally equal,
|
if and only if their current contents are structurally equal,
|
||||||
even if the two mutable objects are not the same physical object.
|
even if the two mutable objects are not the same physical object.
|
||||||
Equality between functional values raises [Invalid_argument].
|
Equality between functional values may raise [Invalid_argument].
|
||||||
Equality between cyclic data structures may not terminate. *)
|
Equality between cyclic data structures may not terminate. *)
|
||||||
|
|
||||||
external ( <> ) : 'a -> 'a -> bool = "%notequal"
|
external ( <> ) : 'a -> 'a -> bool = "%notequal"
|
||||||
(** Negation of {!Pervasives.(=)}. *)
|
(** Negation of {!Pervasives.(=)}. *)
|
||||||
|
|
||||||
|
|
||||||
external ( < ) : 'a -> 'a -> bool = "%lessthan"
|
external ( < ) : 'a -> 'a -> bool = "%lessthan"
|
||||||
(** See {!Pervasives.(>=)}. *)
|
(** See {!Pervasives.(>=)}. *)
|
||||||
|
|
||||||
|
@ -71,7 +70,7 @@ external ( >= ) : 'a -> 'a -> bool = "%greaterequal"
|
||||||
total ordering over all types.
|
total ordering over all types.
|
||||||
The ordering is compatible with [(=)]. As in the case
|
The ordering is compatible with [(=)]. As in the case
|
||||||
of [(=)], mutable structures are compared by contents.
|
of [(=)], mutable structures are compared by contents.
|
||||||
Comparison between functional values raises [Invalid_argument].
|
Comparison between functional values may raise [Invalid_argument].
|
||||||
Comparison between cyclic structures may not terminate. *)
|
Comparison between cyclic structures may not terminate. *)
|
||||||
|
|
||||||
external compare : 'a -> 'a -> int = "compare"
|
external compare : 'a -> 'a -> int = "compare"
|
||||||
|
@ -88,12 +87,12 @@ val max : 'a -> 'a -> 'a
|
||||||
|
|
||||||
external ( == ) : 'a -> 'a -> bool = "%eq"
|
external ( == ) : 'a -> 'a -> bool = "%eq"
|
||||||
(** [e1 == e2] tests for physical equality of [e1] and [e2].
|
(** [e1 == e2] tests for physical equality of [e1] and [e2].
|
||||||
On integers and characters, it is the same as structural
|
On integers and characters, physical equality is identical to structural
|
||||||
equality. On mutable structures, [e1 == e2] is true if and only if
|
equality. On mutable structures, [e1 == e2] is true if and only if
|
||||||
physical modification of [e1] also affects [e2].
|
physical modification of [e1] also affects [e2].
|
||||||
On non-mutable structures, the behavior of [(==)] is
|
On non-mutable structures, the behavior of [(==)] is
|
||||||
implementation-dependent, except that [e1 == e2] implies
|
implementation-dependent; however, it is guaranteed that
|
||||||
[e1 = e2]. *)
|
[e1 == e2] implies [e1 = e2]. *)
|
||||||
|
|
||||||
external ( != ) : 'a -> 'a -> bool = "%noteq"
|
external ( != ) : 'a -> 'a -> bool = "%noteq"
|
||||||
(** Negation of {!Pervasives.(==)}. *)
|
(** Negation of {!Pervasives.(==)}. *)
|
||||||
|
@ -160,7 +159,7 @@ external ( mod ) : int -> int -> int = "%modint"
|
||||||
[x = (x / y) * y + x mod y] and
|
[x = (x / y) * y + x mod y] and
|
||||||
[abs(x mod y) < abs(y)].
|
[abs(x mod y) < abs(y)].
|
||||||
If [y = 0], [x mod y] raises [Division_by_zero].
|
If [y = 0], [x mod y] raises [Division_by_zero].
|
||||||
Notice that [x mod y] is negative if [x < 0]. *)
|
Notice that [x mod y] is negative if and only if [x < 0]. *)
|
||||||
|
|
||||||
val abs : int -> int
|
val abs : int -> int
|
||||||
(** Return the absolute value of the argument. *)
|
(** Return the absolute value of the argument. *)
|
||||||
|
|
Loading…
Reference in New Issue