Task

Determine whether a given year is a leap year in the Gregorian calendar.



See also

 Leap year (wiki)


        define('leap(yr)')  :(end_leap)
leap    eq(remdr(yr,400),0) :s(return)
        eq(remdr(yr,100),0) :s(freturn)
    	eq(remdr(yr,4),0)   :s(return)f(freturn)
end_leap
 
*       # Test and display (with ?: kluge)
        test = "output = ('10' ? (*leap(yr) 1 | 0)) ': ' yr"
        yr = '1066'; eval(test)
        yr = '1492'; eval(test)
        yr = '1900'; eval(test)
        yr = '2000'; eval(test)
end