So in short the case statement is WAY faster than a bunch of if statements.
cool
NecroSOFT - End of line -
If you have 255 unique symbols/whatever inside a case statement, (if that's what you mean) i'd make some simple optimalization beforehand to eliminate the lot you don't need, i'd never make a case statement with more than let's say.. 25 entries. Some might say it becomes unreadable then! So not a question of speed but of nice looking code :lol:
Marmin^.Style
It is often better not to hand-optimize case statements. Free Pascal definately knows how to handle a case statement with 255 entries efficiently.
Bookmarks