- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
So the for / switch paradigm but done badly.
Admin
Slight nitpick, the QueryString struct is part of ASP.NET, not normal .NET. In regular .NET you can either roll your own query building or you can use HttpUtility.ParseQueryString(string.Empty) to get an instance of the private HttpQSCollection class that overrides NameValueCollection with a ToString() that will build the query string.
Admin
yes, let's bash VBA once again, that's the real WTF. So what does a logical OR do? it takes two booleans (a bitfield of 1 bit) and does a bitwise OR. So, OR is always a bitwise OR in VBA, you just have to interpret the results correctly. As always: garbage in is foul ooze out.
Edit Admin
So many programmers enjoy reinventing the wheel as an oblong triangle and just rolling with it.
Edit Admin
Where's the part that checks whether
i
is0
so it can use?
before the keyword instead of&
?Admin
In most other programming languages, the logical or will not evaluate the second clause if the first one is already true (that's what's called short-circuiting). It allows to do stuff like
if( someClassInstancePtr != NULL or someClassInstancePtr->someMember ... )
Edit Admin
Sure, but VB has history and the maintainers have a long history of making sure that everything ever written continues to work. So, since "Or" historically didn't short-circuit (from like the dinosaur days), they instead added a new keyword. Your complaint would be reasonable for a language invented in the past 20 years, but not for one that had a lot of existing code in 1990.
Edit Admin
Nitpick. This isn't VB6 or VBA. It's VB.NET, which is its own thing, and only vaguely compatible with the other two.