ZuneGate ?08: What really happened
#9
Posted 05 January 2009 - 10:45 PM
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.



Sign In
Register
Help

MultiQuote