Next: , Previous: , Up: External Calls to C   [Index]


14.1.4 ick_labeledblock

In INTERCAL programs, labels don’t stand on their own, but instead label a statement. The difference between a standalone line label and a line label that labels a statement is that COME FROMs will come from the label itself (which is before the next statement) when aiming at a standalone line label, but the end of the statement when aiming at a labeled statement. To achieve the same effect in C, the macro ick_labeledblock is available; it can be used as ick_labeledblock(expression,expression) or ick_labeledblock(expression,statement); the first argument is the label, and the second argument is an expression or statement to label (if an expression is labeled, it will be converted to a statement that evaluates it for its side effects and discards the result). It is even permitted to label a block statement in this way. Note, however, that you have to contend with the C preprocessor’s ideas of where macro arguments begin and end when doing this. Other than the position of the COME FROM target created by the label, this behaves the same way as ick_linelabel (so for instance, computed line labels are allowed, but the expression that computes them must not have side effects, and it is only allowed within a function defined with ICK_EC_FUNC_START).