IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New One more thing:
The caseof...case... construct (which was bastartized into the switch...case... construct by K&R) can generally only be used to compare fixed constant values against the target expression. If()...elseif()...else constructs are much more flexible, and can be (mis)used to perform comparisons if several unrelated conditions all witint he same construct.

Not knowing Perl, I don't know whether their given... construct would be restricted to comparisons of constants vs. an expression, or expressions against an expression. One could argue that, if it's the latter, its not a real case statement, but merely the god(s) of Perl showing off.
jb4
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
Rich Cook
New Constant vs an expression
Though, Perl being Perl, there will be a lot of interesting options for the kinds of expressions.

Cheers,
Ben
"good ideas and bad code build communities, the other three combinations do not"
- [link|http://archives.real-time.com/pipermail/cocoon-devel/2000-October/003023.html|Stefano Mazzocchi]
New That's sorta what I figger...
jb4
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
Rich Cook
     Programming algorithms, switch() and Perl. - (static) - (25)
         well its not perl - (boxley) - (1)
             That's a point. - (static)
         What's the diff? If it needs a "break", it's just as stupid! -NT - (CRConrad) - (13)
             The difference is ... - (drewk) - (1)
                 Right, slight assembler efficiency gain. -NT - (admin)
             Re: What's the diff? - (admin) - (10)
                 Couple more - (tuberculosis)
                 It's a kind of concealed goto. - (static)
                 Scott's closest, but not even he got it - my fault, though: - (CRConrad)
                 VB does some things right - (tablizer) - (6)
                     If I'm not mistaken... - (ChrisR) - (1)
                         poor substitute for Boolean expressions - (tablizer)
                     Well, close. But cooler is the range stuff - (tseliot) - (3)
                         Fugly syntax kind'a repeats itself: YTF "select" AND "case"? - (CRConrad) - (2)
                             Not trying to imply invention - (tseliot)
                             Pascal was invented before Visual BASIC - (orion)
         One more thing: - (jb4) - (2)
             Constant vs an expression - (ben_tilly) - (1)
                 That's sorta what I figger... -NT - (jb4)
         Comments and thoughts... - (Simon_Jester) - (5)
             Along similar lines... - (ChrisR) - (1)
                 Multimorphism - (tablizer)
             Sometimes that's overkill. - (static)
             $foo->{$key} - (admin)
             You are probably thinking of - (ben_tilly)

ONE THE MACHINE!
86 ms