function MySimpleHash(a, b: Byte): Word; begin Result := (a shl 8) or b; end; ... case MySimpleHash(a, b) of ... ... ... ... end; ...