This code HAS to be bogus, and for this reason:
ORIGINYEAR is set to a constant "1980", sounds good.
But then the variable 'year' is assigned (set) to this same value, oh dear!
Thus this code only check to see if 1980 was a leap year, which of course it was.
This code, as published, NEVER checks if the current year is a leap of not!
Moreover, this code NEVER returns a return-value, which should/would have been caught by the compiler.
Nice try but, if you are going to invent this rubbish, at least get the basics correct.
ORIGINYEAR is set to a constant "1980", sounds good.
But then the variable 'year' is assigned (set) to this same value, oh dear!
Thus this code only check to see if 1980 was a leap year, which of course it was.
This code, as published, NEVER checks if the current year is a leap of not!
Moreover, this code NEVER returns a return-value, which should/would have been caught by the compiler.
Nice try but, if you are going to invent this rubbish, at least get the basics correct.
Go to original post
1
2
Previous
Next
- PCW Network
- MacUser
- Mac OS X Hints
- iPhone Central
- PC World
- PCW Business Center
- About Macworld
- Advertise
- Macworld Expo
- MacMania
- Terms of Service Agreement
- Privacy Policy
© Jive Software


