Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site houligan.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!akguc!codas!peora!ucf-cs!novavax!houligan!daemon From: daemon@houligan.UUCP Newsgroups: net.lang.c Subject: Re: mildly obfuscating c Message-ID: <226@houligan.UUCP> Date: Tue, 17-Dec-85 16:07:19 EST Article-I.D.: houligan.226 Posted: Tue Dec 17 16:07:19 1985 Date-Received: Fri, 20-Dec-85 06:18:39 EST Sender: daemon@houligan.UUCP Organization: Gould Electronics, Ft. Lauderdale, Florida. Lines: 30 > i haven't been able to figure out anyway to "goto" a label that > i don't know. for example, i would like to do this: > > ------------------------------------------------------------- > main() { > int (*jump[])() = { l1,l2,l3,l4,l5,l6,l7,l8 } > > l1: /* code */ > l2: /* code */ > l3: /* code */ > l4: /* code */ > l5: /* code */ > l6: /* code */ > l7: /* code */ > l8: /* code */ > > goto *jump[whatever] > } > ------------------------------------------------------------- > > aside from the forward-referencing problem of the unseen labels, > this is a still syntax error. anyone have any way to do this? The simplest method to accomplish this is the "switch" statement. --tgi while (--tgi) /* my mind continues to decay */ ; /* even though I do nothing.. */ {brl-bmd,ccvaxa,pur-ee,sun}!csd-gould!midas!tgi (Craig Strickland @ Gould) 305/587-2900 x5014 CompuServe: 76545,1007 Source: BDQ615 MCIMail: 272-3350