John Baird
Coatesville, Pennsylvania, United States
General information
Category:
Coding, syntax and commands
>>>>Look at the switch command
>>>
>>>Switch will not help me in this case as I need 3 cases:
>>>
>>>Both variables defined
>>>
>>>startTime defined
>>>
>>>endTime defined
>>>
>>>I don't see how switch can help - switch is only for checking a single variable against predefined values.
>>
>>That's the problem.... if its not in a blog post, you can't figure it out....Learn to think outside a blog post...
>
>I don't see how it could be used in any efficient way since the parameter to a switch statement must be a simple type.
I didn't say it would be efficient, but the point is that she said a switch wouldn't work when replying to me when I knew it would. You have to think differently than Naomi thinks. Gregory showed her two ways of using the switch, but she can't accept that because she knows it won't work. But I bet, Gregory's solution would be pretty close to as fast as the if's/elses.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only