Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site reed.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!mhuxj!mhuxr!ulysses!allegra!mit-eddie!genrad!decvax!tektronix!reed!alexis From: alexis@reed.UUCP (Alexis Dimitriadis) Newsgroups: net.lang.c Subject: Re: goto variables? Message-ID: <986@reed.UUCP> Date: Mon, 25-Feb-85 04:52:05 EST Article-I.D.: reed.986 Posted: Mon Feb 25 04:52:05 1985 Date-Received: Fri, 1-Mar-85 05:57:54 EST References: <8349@brl-tgr.ARPA> Organization: Reed College, Portland, Oregon Lines: 28 > > main() > > { > > int *a; > > > > b: > > a = b; > > printf("a = 0x%x\n", a); > > } > > > > (NOTE: This was compiled under 4.2BSD on a -750) > > > > This compiles and runs perfectly. However, when adding an obvious statement > > (namely, "goto *a") it won't let us compile it. It seems like the compiler > > will *almost* let us do this. > > > > What I want to know is, "can this be easily added to the language?", > > "Is it a reasonable thing to add?". Comments anyone? > > Technically it is illegal to assign `a=b', [...] > Try using setjmp/longjmp to do this. > Is it a reasonable thing to add? A goto that uses a variable like would be the equivalent of a calculated goto (or something like that) in Fortran. I doubt the C language needs a lot of gotos. alx PS Sorry for the long context quote.