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 VB does some things right
VB allows more of a set-based approach. It kind of resembles:
\nselect on (foo) \ncase 1:\n   /* something for 1 */\ncase 1,4:\n   /* something for 1 and 4 */\ncase 2:\n   /* something for 2 */\ncase 2,3:\n   /* something for 2 and 3 */\ndefault:\n   /* something for other things */\nend select\n


All without those fricken "break" dealies.
________________
oop.ismad.com
New If I'm not mistaken...
Having the same option in multiple case statements is legal in VB but it only peforms the first case that is matched.
New poor substitute for Boolean expressions
Having the same option in multiple case statements is legal in VB but it only peforms the first case that is matched.

You are right. Bad example on my part.

But, if you want potentially multiple blocks to execute, then you might as well use IF blocks. I tend to shift to IF blocks for all but the simplest of case statements anyhow. They scale better in complexity.

And, I don't like BREAK statements. Too easy to forget, and they are a dumb substitute for Boolean expressions IMO. Too Goto-like.

________________
oop.ismad.com
New Well, close. But cooler is the range stuff
Select aNumber\n   Case Is < 0\n      FunctionA\n   Case 0 to 3\n      FunctionB\n   Case 4, 15, 32, 78\n      FunctionC\n   Case Else\n      FunctionD\nEnd Select

Many fears are born of stupidity and ignorance -
Which you should be feeding with rumour and generalisation.
BOfH, 2002 "Episode" 10
New Fugly syntax kind'a repeats itself: YTF "select" AND "case"?
Our residentnoncapitalisedpoet claims VB's "range" case construct is so cool:
Select aNumber\nCase Is < 0\nFunctionA\nCase 0 to 3\nFunctionB\nCase 4, 15, 32, 78\nFunctionC\nCase Else\nFunctionD\nEnd Select
Just so nobody labours under the misapprehension that this was a VB "innovation" or anything... Pascal has had that since 197x!

The ony difference being, the Pascal syntax is (as always) *much* cleaner and more elegant than VB's:
Case AnInteger of\n  -MAXINT .. -1  : ProcedureA;\n        0 ..  3  : ProcedureB;\n   4, 15, 32, 78 : ProcedureC;\n            Else   ProcedureD;\nEnd;  {Case AnInteger}
Behold the genius of Wirth in action: One construct, one keyword!


   [link|mailto:MyUserId@MyISP.CountryCode|Christian R. Conrad]
(I live in Finland, and my e-mail in-box is at the Saunalahti company.)
Your lies are of Microsoftian Scale and boring to boot. Your 'depression' may be the closest you ever come to recognizing truth: you have no 'inferiority complex', you are inferior - and something inside you recognizes this. - [link|http://z.iwethey.org/forums/render/content/show?contentid=71575|Ashton Brown]
New Not trying to imply invention
Just pointing out:

1) tablizer's "VB" didn't look like any VB I've ever seen, and
2) I didn't think he pointed out anything really useful. So I thought I would.

We now return you to your regularly scheduled language war.

Many fears are born of stupidity and ignorance -
Which you should be feeding with rumour and generalisation.
BOfH, 2002 "Episode" 10
New Pascal was invented before Visual BASIC
I remember using it in Turbo Pascal 2.0 before VB came out. Thanks for the reference.

In Pascal, Semi-Colons are your friends. :)


[link|http://pub75.ezboard.com/bantiiwethey|
New and improved, Chicken Delvits!]
     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)

Able to chew and walk gum at the same time.
211 ms