Page 1 of 1

[Implemented] Multiple Expressions in Case Statement

Posted: Sat Dec 27, 2003 8:02 pm
by ebs
I'm converting some Visual Basic code (to read EXIF information in image files) to PB and I ran into this minor annoyance. In VB, the Case statement (in a Select Case) can have multiple expressions, as in:

Code: Select all

Select Case Var
  Case 1,3,5
          .
          .
  Case 16,20,32
          .
          .
End Select
In PB, I have to repeat whole blocks of code to get the same result. I know I can use multiple If - ElseIf statements in PB, put this would be a handy addition to the PB Select statement, if it isn't too hard to implement.

Posted: Sat Dec 27, 2003 11:03 pm
by blueznl
that's one that has come up before :-) and yes, i like it too! :-)

Posted: Sat Dec 27, 2003 11:13 pm
by Denis
Yes,

I think it's a good idea. :wink:

Denis

Posted: Sun Dec 28, 2003 12:11 am
by Andre
Denis wrote:Yes,

I think it's a good idea. :wink:

Denis
And it was already on the wishlist, see here, here and here.

So its up to Fred.... :D

Currently the best choice is to use If, ElseIf, Else, EndIf instead.