Hacker News new | past | comments | ask | show | jobs | submit login

Yes, as SixSigma says, it's called a jump table; I've also seen it called a dispatch table (because you dispatch control to the right function based on a key). It's quite an old technique, dating from the earliest programming languages and even used in assembly language. using indirect addressing and suchlike techniques.

Edit: Looked it up, dispatch table is in Wikipedia:

http://en.wikipedia.org/wiki/Dispatch_table




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: