Got an idea for enhancing PureBasic? New command(s) you'd like to see?
naw
Enthusiast
Posts: 573 Joined: Fri Apr 25, 2003 4:57 pm
Post
by naw » Thu Sep 09, 2004 3:22 pm
Hi,
This would be nice:
Select X
*** caseif (X>100 and X<200): Debug "somewhere between 100 - 200" ***
case 150: Debug "150"
default: Debug "way off"
endSelect
- Oh Yes, and STDIN / STDERR support for PB4 would be fantastic
Ta - N
Ta - N
GreenGiant
Enthusiast
Posts: 252 Joined: Fri Feb 20, 2004 5:43 pm
Post
by GreenGiant » Thu Sep 09, 2004 4:24 pm
Can't you use If and Elseif for pretty much anything you use select and case for. That would allow more complex statements. It seems to do roughly the same thing to me. I wonder if it gets converted to the same ASM, I'll have top check later.
naw
Enthusiast
Posts: 573 Joined: Fri Apr 25, 2003 4:57 pm
Post
by naw » Fri Sep 10, 2004 1:59 pm
Yes of course, I just like to use Case Statements when I have long lists of statements -
long lists of if...then...else...elseif gets a bit messy & hard to follow (IMO)
Ta - N
Dare2
Moderator
Posts: 3321 Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land
Post
by Dare2 » Fri Sep 10, 2004 2:56 pm
If speed is important, do a time test on Select/Case -v- If/ElseIf.
I think you'll find If/ElseIf is faster.
@}--`--,-- A rose by any other name ..