Case with a range

BlitzMax Forums/BlitzMax Beginners Area/Case with a range

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Would someone mind expanding on this information. I would really like to know more about "jump table" and "single jump" - what are you talking about.


A jump table is a table of JMP (or goto if you will) instructions, going to the various parts of a Select statement.
So instead of comparing each Case with the current value, you can use indexing to find the correct spot.

So, is either (Select - End Select) or (If - End If) better or simply a matter of programmers likes.

Yes, and no ;) it all depends on what assembler the compiler generates, but in this case it seems BlitzMax doesnt care.
They have different purposes in my view, feks large if-then-elseif blocks can be confusing to read, a select-case would probably fit better.