Thread: case statement
View Single Post
  #6 (permalink)  
Old August 18th, 2003, 10:59 PM
nikolai nikolai is offline
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Rich, that sounds pretty dangerous, actually. I would stay away from it for two main reasons:

1) It's not a feature supported by most other languages implementing "switch",

2) It might "work" for the wrong reasons, meaning that it might accept invalid input into that case statement.

This reminds me of why PHP implemented equivalence operators (=== and !==). I don't have the time to go into it now, maybe I'll play with some tests and get back to you tomorrow.



Take care,

Nik
http://www.bigaction.org/
Reply With Quote