Mike Lewis
Programmer
After our excursion into American TV history, today's exercise returns to VFP programming fundamentals.
Your task is to write a function that receives a year (e.g. 2015), and returns .T. if the year is a leap year.
That's all there is to it. As usual, kudos will go to the person who suggests the smallest function (that is, the least amount of code). It doesn't have to be particularly readable or easy to understand.
The function must not have any side effects. If it changes any aspect of the environment (such as SET values), it must change it back again.
If you are one of the first to respond, please use
Your task is to write a function that receives a year (e.g. 2015), and returns .T. if the year is a leap year.
That's all there is to it. As usual, kudos will go to the person who suggests the smallest function (that is, the least amount of code). It doesn't have to be particularly readable or easy to understand.
The function must not have any side effects. If it changes any aspect of the environment (such as SET values), it must change it back again.
If you are one of the first to respond, please use
tags to hide your answer. (An easy way to insert these tags is to use the little yellow icon to the right of the
Code:
icon at the top of the editing window.)
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
[url=http://www.ml-consult.co.uk/foxstuff.htm]Visual FoxPro articles, tips and downloads[/url]