·······@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.
"Stig Hemmer" <····@pvv.ntnu.no> wrote in message ·······················@pvv.ntnu.no...
> ·······@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.
As is frequently the case with C, you have to cast everything to
void * to work around the truly deficient type language.