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.
24 lines
532 B
24 lines
532 B
=proto
|
|
duk_uint_t duk_require_uint(duk_context *ctx, duk_idx_t index);
|
|
|
|
=stack
|
|
[ ... val! ... ]
|
|
|
|
=summary
|
|
<p>Like <code><a href="#duk_get_uint">duk_get_uint()</a></code>,
|
|
but throws an error if the value at <code>index</code> is not a number
|
|
or if the index is invalid.</p>
|
|
|
|
<!--
|
|
<p>The number is coerced as for <code><a href="#duk_get_uint">duk_get_uint()</a></code>
|
|
with only numeric inputs allowed.</p>
|
|
-->
|
|
|
|
=example
|
|
printf("unsigned int value: %lu\n", (unsigned long) duk_require_uint(ctx, -3));
|
|
|
|
=tags
|
|
stack
|
|
|
|
=introduced
|
|
1.0.0
|
|
|