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.
15 lines
342 B
15 lines
342 B
=proto
|
|
int duk_require_boolean(duk_context *ctx, int index);
|
|
|
|
=stack
|
|
[ ... val! ... ]
|
|
|
|
=summary
|
|
<p>Like <tt><a href="#duk_get_boolean">duk_get_boolean()</a></tt>,
|
|
but throws an error if the value at <tt>index</tt> is not a boolean
|
|
or if the index is invalid.</p>
|
|
|
|
=example
|
|
if (duk_require_boolean(ctx, -3)) {
|
|
printf("value is true\n");
|
|
}
|
|
|