phi( key, lo, up) typekey key; int lo, up; {int i; i = (key-MinKey) * (up-lo+1.0) / (MaxKey-MinKey) + lo; return( i>up ? up : i