Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!egrunix!schemers From: schemers@egrunix.UUCP (Roland Schemers) Newsgroups: comp.lang.c Subject: Re: Oh nooo! (gotos) Summary: this works Keywords: what if... Message-ID: <148@egrunix.UUCP> Date: 7 Sep 89 15:13:09 GMT References: <7598@goofy.megatest.UUCP> <12793@pur-ee.UUCP> <1461@atanasoff.cs.iastate.edu> <147@egrunix.UUCP> Reply-To: schemers@unix.secs.oakland.edu.UUCP (Roland Schemers) Distribution: usa Organization: Oakland University, Rochester, MI Lines: 24 I just compiled this, and it works (gcc 1.35.0): #define begin_loop(name) for(;;) #define exit_loop(name) goto name; #define end_loop(name) name:; main() { begin_loop(test) { printf("hello!\n"); exit_loop(test); printf("goodbye!\n"); } end_loop(test) } It only prints "hello!" -- Roland J. Schemers III 'Real programmers don't write specs. Systems Programmer Users should be grateful for whatever Oakland University they get. They are lucky to get any schemers@unix.secs.oakland.edu programs at all.'