Next: ick_forget, Previous: ick_next, Up: External Calls to C [Index]
ick_resume
is a macro, but there are few restrictions on
its use; it is permitted to use it inside an expression (but it returns
void, making this not particularly useful), and acts like a function
which takes an unsigned short argument, returns void, and has a
prototype (but you cannot take its address; if you need to be able to
do that, write a wrapper function for it). It can be used within any
function regardless of how it was declared, and never returns; instead,
it pops the specified number of NEXT
stack entries and
resumes execution at the last one popped, just as the
INTERCAL statement does. This causes the same errors
as the INTERCAL statement if the number of entries
popped is zero or larger than the NEXT
stack.
There is also a macro ick_return_or_resume();
; it can only
be used inside a function defined with ICK_EC_FUNC_START
,
and is equivalent to return;
if the function was called
from C, or ick_resume(1);
if the function was called from
INTERCAL. It’s therefore a safe way to return
from such a C function if you don’t know how control reached it
in the first place.