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

CPS in C

1 view
Skip to first unread message

Stig Hemmer

unread,
Aug 14, 2002, 7:00:33 PM8/14/02
to
ste...@dino.dnsalias.com (Stephen J. Bevan) writes:
> Sure, I have some C code that uses CPS by allocating small structs

I tried to write some code that did CPS-like stuff in C.
The important line was

while(( p= (*((void *(*)()) p))()));

Having written this line, I was exhausted and never finished the rest
of the portable Scheme-to-C compiler this was supposed to become.

This should perhaps be called Continuation Returning Style.

Stig Hemmer,
Jack of a Few Trades.

Joe Marshall

unread,
Aug 15, 2002, 12:21:50 AM8/15/02
to

"Stig Hemmer" <st...@pvv.ntnu.no> wrote in message news:ekvhehx2g...@pvv.ntnu.no...

As is frequently the case with C, you have to cast everything to
void * to work around the truly deficient type language.

0 new messages