FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » switch with range of comparisons
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: switch with range of comparisons [message #184639 is a reply to message #184636] Tue, 14 January 2014 00:30 Go to previous messageGo to previous message
Beauregard T. Shagnas is currently offline  Beauregard T. Shagnas
Messages: 154
Registered: September 2010
Karma:
Senior Member
richard the sto0pid wrote:

> switch ($value){
>
> case "A">="Z";
>
> }
>
> Would this be allowed?

How will "A" ever be equal-to or greater-than "Z"?

> What I want to do is to have one case for all 26 letters of the alphabet
> without having to use ||.

Why would you want to use switch for only one condition?

Go to your local big box store and purchase a carton of Logic.

--
-bts
-who opened a Pandora's Box, introducing RtS to "switch"
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: When a random file is not found then what?
Next Topic: [CM] Falkvinge: MtGox had custom SSHD written in PHP
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 18:55:56 GMT 2024

Total time taken to generate the page: 0.05547 seconds