checking for a range of numbers

Blitz3D Forums/Blitz3D Programming/checking for a range of numbers

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.

Function IntInRange(intToCheck%,startOfRange%,endOfRange%)
If startOfRange<endOfRange
	startOfRange=startOfRange-1
	endOfRange=endOfRange+1
	If intToCheck < endOfRange
	If intToCheck > startOfRange
		Return True
	EndIf
	EndIf
Else
	startOfRange=startOfRange+1
	endOfRange=endOfRange-1
	If intToCheck < startOfRange
	If intToCheck > endOfRange
		Return True
	EndIf
	EndIf
EndIf
Return False
End Function