I agree with Martin.

The CASE statement is just a more human readable form of multiple IF
statements. I switch TO case statements when the logic becomes a little
convoluded and I only want one result. That, in essense is the purpose of
CASE, only one should fall true (or none if you omit the bailout CASE 1)

I've seen
CASE X=1 ; GOSUB 10
followed later in the same block with
CASE X#1 ; GOSUB 20

so the construct may be a little hard to understand.

Our is one of the more powerful forms of case. VB's tests only one variable
(IIRC) where as MV tests combinations as well.

My 1 cent.
----- Original Message -----
From: "Martin Phillips" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, July 25, 2007 12:37 PM
Subject: Re: [U2] [u2] : Cleaner Case Statement


> Hi Bill,
>
> Unlike languages such as C, Basic does not allow multiple conditions in
the
> way in which you are looking to do. In terms of run time performance or
> program size, if it really is just a GOSUB, there whould be little
> disadvantage in writing the more verbose form of your first example.
>
>
> Martin Phillips
> Ladybridge Systems Ltd
> 17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
> +44-(0)1604-709200
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to