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.
 
 
 
 
 
 

30 lines
631 B

name: duk_peval_noresult
proto: |
duk_int_t duk_peval_noresult(duk_context *ctx);
stack: |
[ ... source! ] -> [ ... ]
summary: |
<p>Like <code><a href="#duk_peval">duk_peval()</a></code> but leaves no result
on the value stack (regardless of success/error result).</p>
example: |
duk_push_string(ctx, "print('Hello world!'); syntax error here=");
if (duk_peval_noresult(ctx) != 0) {
printf("eval failed\n");
} else {
printf("eval successful\n");
}
tags:
- compile
- protected
seealso:
- duk_peval_string_noresult
- duk_peval_lstring_noresult
- duk_peval_file_noresult
introduced: 1.0.0