It is often better not to hand-optimize case statements. Free Pascal definately knows how to handle a case statement with 255 entries efficiently.