Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!psuvax1!gatech!uflorida!mailrus!csd4.csd.uwm.edu!cs.utexas.edu!uunet!bfmny0!tneff From: tneff@bfmny0.UUCP (Tom Neff) Newsgroups: comp.lang.c Subject: Re: Calling functions in C.... Keywords: It is not as simple as it sounds... Message-ID: <14555@bfmny0.UUCP> Date: 16 Aug 89 15:31:22 GMT References: <2108@infmx.UUCP> Reply-To: tneff@bfmny0.UUCP (Tom Neff) Distribution: usa Organization: ^ Lines: 19 In article <2108@infmx.UUCP> segel@infmx.UUCP (Mike Segel) writes: > I want to write a C function which will be passed a set of strings. >The C function would then use the first parameter as the function name, >and the other parameters as the variables. > I can figure out how to get the variables passed, but I cannot >think of a way to handle the function name. Unh-unh. This is the sort of thing a C *interpreter* might be able to handle, but not a compiler. You're talking about dynamically resolving a program symbol name at runtime (by which time, in most systems, the names have ceased to exist). Certain exceptional systems may offer this feature (I am sure we will now be inundated with little twisty followups all alike telling us about the exceptions), but mostly no. And if it were offered it would be plastered all over the documentation as a super duper feature so the original posting would not have been needed. :-) -- "We walked on the moon -- (( Tom Neff you be polite" )) tneff@bfmny0.UU.NET