[comp.lang.c] forever/nevermore

gaynor@romulus.rutgers.edu (Silver) (09/08/90)

I put together what I think is a cute macro.  It's a forever loop statement
with a way to break out of it, the nevermore statement, that defeats other
forms of nesting by using a goto.  However, I don't know how to make it
nestable.  Don't think it can without mucking up its simplicity (or perhaps not
at all?), but I thought I'd bounce it off the net for advice.

    #define forever   if (0) {NeVeRmOrE:;} else for (;;)
    #define nevermore goto NeVeRmOrE

Mail is welcome, I'll summarize.

Regards, [Ag] gaynor@paul.rutgers.edu

karl@haddock.ima.isc.com (Karl Heuer) (09/10/90)

>I put together what I think is a cute macro.

You'll grow out of it.