[net.lang.c] Strings as indexes, pointers to functions

larry@Jpl-VLSI.ARPA (03/11/86)

I'm writing a microEmacs to insert in a larger program.  I want to be able to
bind functions to arbitrarily long strings of characters surrounded by white 
spaces, so the discussion of function pointers has been useful.

However, I'm also looking for a way to use strings as indexes into an array 
of function pointers.  Anyone know a clever way to do this?  I'm sure the 
problem must have been solved any number of times by spelling checkers any 
among other programs.  (Erhh...PROGRAMMERS of spelling checkers!)

Come to think of it, anyone know a good book on using C to implement various
kinds of data structures?  Various kinds of functions, such as windowing systems?  Seems like a good thing to have in one's library.

                     Larry @ jpl-vlsi.arpa