- 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
Precedence operators. What's in the parentheses is calculated first, and then a is set equal to the result.
VB classic used variant variable types extensively. They could become any type simply by assignment. If you didn't explicitly declare your variable (and if you didn't use "Option Explicit" to require explicit variable declaration), then upon the first use of an undeclared variable it was created as a variant. In the example above, if a hasn't been declared somewhere above, it begins as a variant and then becomes a boolean by assignment.
Admin
Well I wouldnot hire you :)
The code could be shortened by a factor 20.
And the code is incorrect :)
'the month is february, check for leap year
Case 2 :
remainder = yearNumber Mod 4
is incorrect!
Admin
Blocked cookies will cause this.
Admin
I believe that the equal sign is also a comparison operator in VB....
Admin
But I belive you've got most adequate what you have requested - if you smart enought to ask such a question for $250/h you should expect such an answer. And the consultant seems to have a good sense of humour.
Admin
Admin
Correct me if I am wrong but would this even build as you are supposed to be returning an integer yet you return a boolean??
Admin
Obviously a lot of people have never tried validating dates with IsDate() in VB6 IsDate("1") returns true!! Isdate("1 1") returns true!! Don't even think about handling different locales with it either! I've always found it easier to validate the date myself in VB (pre .net).
Admin
I thought it was funnier the first time...
Admin
Surely if == has higher precedence than || and && you were right the first time?
Admin
Yep, that's what I thought, too!
Admin
doesn't the game exist, only because there are players??? fo shizzle