Table lookups

Doug Gwyn gwyn at brl-smoke.ARPA
Mon Jun 27 05:35:20 AEST 1988


Consider using an array of (value, function) pairs; search this table
for a matching value then execute the corresponding function.  (If the
table is sorted by value, you can use bsearch() to search it.)



More information about the Comp.lang.c mailing list