Could a way be found to control the flow so that the next case (not always
the one next in the order of the statment) could be executed? For example
you have cases 1-10. You want all odd cases to also execute case 9 and the
even cases to also execute case 10. So in case 3 you would say something
like: pergo(9); 

-----Original Message-----
From: Ted Ashton [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 04, 2000 2:29 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; Graham Barr
Subject: Re: RFC 22 (v1) Builtin switch statement


Thus it was written in the epistle of Damian Conway,
> 
> But a switch is not a loop.
> Within a loop the logic is:
> 
>       next -> try next case
>       last -> this was the last case

As it has already caused a little confusion, could we go with another word
instead of next?  'fallthrough' seems a bit much to type.  How about
'proceed',
'fall', 'exinde', 'porro', or (my favorite at the moment) 'pergo' ;-).

>    > this would mean that fallthrough would be the default and the user
>    > would need a last; to break out;
> 
> Long and bitter experience indicates that fallthrough is a poor default
> (but a good *option*).

Righto.  Well said,
Ted
-- 
Ted Ashton ([EMAIL PROTECTED]), Info Sys, Southern Adventist University
          ==========================================================

I think that there is a moral to this story, namely that it is more
important to have beauty in one's equations that to have them fit
experiment. . . .  It seems that if one is working from the point of view of
getting beauty in one's equations, and if one has really a sound insight,
one is on a sure line of progress.
                                        -- Dirac, Paul Adrien Maurice (1902-
)
          ==========================================================

         Deep thoughts to be found at http://www.southern.edu/~ashted

Reply via email to