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

Home » Imported messages » comp.lang.php » Switch question
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Switch question [message #184605 is a reply to message #184603] Sun, 12 January 2014 17:44 Go to previous messageGo to previous message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma:
Senior Member
On 12-01-2014 18:26, richard wrote:
> On Sun, 12 Jan 2014 17:18:59 +0000 (UTC), Denis McMahon wrote:
>
>> On Sun, 12 Jan 2014 11:48:48 -0500, richard wrote:
>>
>>>
>>> So what is the proper way to ensure the proper case is found correctly?
>>
>> You seem to have missed the paragraph beginning "It is important to
>> understand how the switch statement is executed in order to avoid
>> mistakes." on the manual page. This paragraph answers your question.
>
> for once I get to say, to you, >>>> RTFM!
> : is used for constants.
> ; is used for strings.
>

From the manual:
"It's possible to use a semicolon instead of a colon after a case like:"

But this has nothing to do with contants or strings, or....?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: signed int64 pack/unpack
Next Topic: Trouble connecting to a PHP SoapServer module
Goto Forum:
  

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

Current Time: Fri Sep 20 10:41:05 GMT 2024

Total time taken to generate the page: 0.05011 seconds