Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!apple!uokmax!munnari.oz.au!goanna!minyos!mpapp@godzilla.cgl.rmit.oz.au From: mpapp@ (Mike Papper) Newsgroups: comp.lang.c Subject: strings as functions Keywords: strings pointers functions Message-ID: Date: 7 Jan 91 02:18:10 GMT Sender: news@minyos.xx.rmit.oz.au Lines: 19 Is there a way to use a string value as the name of a function? In other words, can I use a string (possibly typed in by a programmer) as a function call to a function of the same name? One method may be to call the same function, which uses the value of the string to decide which real function to call. In this case the programmer would have to edit the source code that was generated to match up the strings and the appropriate function calls. The idea is to have a program that reads an ASCII file to generate an interface, which when buttons are selected, the appropriate function is called. The function to call would be found in the ascii file, and the program would assume the programmer had created the function of same name somewhere. Can this be done? easily? Mike Papper