Next: External Calls to Funge-98, Up: External Calls [Index]
INTERCAL-72 | C-INTERCAL | CLC-INTERCAL | J-INTERCAL |
---|---|---|---|
no | version 0.28+ | no | no |
Linking C and INTERCAL programs is achieved by
placing various constructs into the C programs that are equivalent to
various INTERCAL constructs. It is possible to
simulate a line with a label and a dummy command (which serves as a
COME FROM
suckpoint and NEXT
target), a
command with a line label, NEXT
, RESUME
, and
FORGET
, and COME FROM
and NEXT
FROM
. Onespot and twospot variables are accessible from inside
the C program, where they can be read and written; however, the
INTERCAL program cannot access any variables inside
the C program that weren’t part of the
INTERCAL program originally.
To prevent various logical impossibilities, there are restrictions on where these can be used and what preparation is needed before they are used. Also, the semantics are not always exactly what you might expect for technical reasons.
It should be observed that the INTERCAL link
intrudes on the user namespace. To prevent possible namespace clashes,
no identifiers starting with ick_
or ICK_
should be used anywhere in the linked C program for any reason, except
where specified in this manual.
• External C Call Infrastructure: | Enabling a C program for external calls | |
• ick_startup: | Doing things at startup | |
• ick_linelabel: | Labelling lines... | |
• ick_labeledblock: | ...and labelling blocks | |
• ick_comefrom and ick_nextfrom: | Stealing control from elsewhere | |
• ick_next: | The INTERCAL answer to subroutine calls | |
• ick_resume: | Going back to before a NEXT | |
• ick_forget: | Discarding NEXT stack entries | |
• ick_get/setone/twospot: | Accessing INTERCAL variables from C | |
• ick_create: | CREATE statements via external calls | |
• External Calls and auto: | Considerations for auto variables |
Next: External Calls to Funge-98, Up: External Calls [Index]