Path: utzoo!utgpu!water!watmath!clyde!att!pacbell!ames!mailrus!husc6!cmcl2!brl-adm!brl-smoke!gwyn
From: gwyn@brl-smoke.ARPA (Doug Gwyn )
Newsgroups: comp.lang.c
Subject: Re: Table lookups
Message-ID: <8163@brl-smoke.ARPA>
Date: 26 Jun 88 19:35:20 GMT
References: <1802@loral.UUCP>
Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) )
Organization: Ballistic Research Lab (BRL), APG, MD.
Lines: 3

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.)