End Of file (sourse Code)

BlitzPlus Forums/BlitzPlus Bug Reports/End Of file (sourse Code)

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.

That said: I'm not really sure what you're trying to accomplish here, but rathern than doing a million semi-identical if/endif statements, you can get it a LOT more compact by expanding your parameters:

Don't do 40 identical comparisons, but just a single check to see if the value is larger than or equal to 20, and smaller than or equal to 60, like this:

if numba>=20 and numba<=60 then pick=1


Or if you do have a lot of comparisons against different values, you can also use a select statement instead:

(Just for display purposes below, it won't return the same variable info as your example above ought to do)

Select numba
	Case 20
		pick=1
	Case 20,21,22,23,24,25,26,27,28,29,30
		pick=2
	Case 31,32,33,34,35,36
		pick=3
	Default
		pick=0
End Select