Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

COME FROM/NEXT FROM combinations

5 views
Skip to first unread message

ais523

unread,
Mar 30, 2007, 3:53:19 AM3/30/07
to
(1) DO NOTHING
(2) DO COME FROM (1)
(3) DO NEXT FROM (1)

This is reasonably well-defined in most INTERCAL implementations at
the moment (I take it this is simply an error in CLC-INTERCAL), but
attempting to add NEXT FROM to C-INTERCAL brings up a problem. If both
lines said 'COME FROM', the program would multithread. The question:
is multithreading the correct way to behave in this situation as well?
What about multiple NEXT FROMs?

(By the way, I've already implemented most of my wishlist; even
operand overloading is available in a limited form (only for onespot
and twospot variables, because (a) @1/#1 (or _1/#1 will be the new C-
INTERCAL syntax for a nospot variable, to continue the chain of
incompatiblity, at the point where nospot variables are actually
implemented) would be far too easy, (b) it couldn't be used in C-
INTERCAL anyway because there's no context in which a nospot or array
value is legal, and (c) that sort of thing precludes compilation to a
non-selfmodifying-language (although it allowes bytecode compilation
and interpreter generation)). It's pretty much just NEXT FROM and some
tidying up that's left.
--
ais523

Claudio Calvelli

unread,
Mar 30, 2007, 9:06:38 AM3/30/07
to
On 2007-03-30, ais523 <ais...@bham.ac.uk> wrote:
> (1) DO NOTHING
> (2) DO COME FROM (1)
> (3) DO NEXT FROM (1)
>
> This is reasonably well-defined in most INTERCAL implementations at
> the moment (I take it this is simply an error in CLC-INTERCAL), but
> attempting to add NEXT FROM to C-INTERCAL brings up a problem. If both
> lines said 'COME FROM', the program would multithread. The question:
> is multithreading the correct way to behave in this situation as well?
> What about multiple NEXT FROMs?

COME FROM and NEXT FROM are treated almost identically by CLC-INTERCAL,
the only difference is that NEXT FROM stashes the return address and
COME FROM doesn't. So in this case the program will multithread (if
enabled) or splat (if multithreading is disabled). One of the two
threads will also be able to RESUME back to the statement after the
DO NOTHING, while the other one won't.

Hope this clarifies matters. I guess I ought to update the
documentation.

C

--
It should be obvious that the From: line is a spamtrap.
Replace the two "spamtrap"s with "org" and "uk".

0 new messages