mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
941 B
31 lines
941 B
=proto
|
|
int duk_strict_equals(duk_context *ctx, int index1, int index2);
|
|
|
|
=stack
|
|
[ ... val1! ... val2! ... ]
|
|
|
|
=summary
|
|
<p>Compare values at <code>index1</code> and <code>index2</code> for equality.
|
|
Returns 1 if values are considered equal using Ecmascript
|
|
<a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.4">Strict Equals</a>
|
|
operator (<code>===</code>) semantics, otherwise returns 0. Also returns 0 if either index
|
|
is invalid.</p>
|
|
|
|
<p>Because
|
|
<a href="http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.6">The Strict Equality Comparison Algorithm</a>
|
|
used by the Strict Equals operator performs no value coercion, the comparison cannot have
|
|
side effects and cannot throw an error.</p>
|
|
|
|
=example
|
|
if (duk_strict_equals(ctx, -3, -7)) {
|
|
printf("values at indices -3 and -7 are strictly equal\n");
|
|
}
|
|
|
|
=tags
|
|
compare
|
|
|
|
=seealso
|
|
duk_equals
|
|
|
|
=fixme
|
|
Currently buffer equality does not cause buffer contents to be compared.
|
|
|