BlitzMax Request: expression ranges.
BlitzMax Forums/BlitzMax Programming/BlitzMax Request: expression ranges.
| ||
Would it be to much trouble to implement something like this using the Select block?Select MouseX() Case 100 To 200 Case 201 To 300 Case 301 to 400 End Select I think this would be good so you won't have to use if/else stmts. |
| ||
Heres a way ...m=MouseX() Select True Case (m>=1 And m<=4) Case m=5,m=6,m=7 Case m=8,(m=9 Or m=10) End Select Print Next |
| ||
Personally, I don't think this should be included.Local MX:Int = MouseX() If MX > 100 And MX < 200 Then ElseIf MX > 200 And MX < 300 Then ElseIf MX > 300 And MX < 400 Then EndIf While I do thing that the ranges make code look better, I don't think they're really neccessary. |
| ||
Yeah. Use "Select True". |
| ||
Very well. Thanks jb! |