LEAPYEAR Returns a logical value indicating whether a given year is a leap year. (F) Invocation value = LEAPYEAR(year) value The value returned is either: Y - Year given is a leap year. N - Year given is not a leap year. year A given year. Example The rules in this example: 1. Use LEAPYEAR as a condition to a rule 2. Call in a rule to be a function of another rule Rule Using LEAPYEAR: LEAPYEAR is called in as a condition to the DAYS_OF_YEAR rule: DAYS_OF_YEAR(YEAR); _ --------------------------------------------------------------------- _ LEAPYEAR(YEAR); | Y N _ ------------------------------------------------------------+-------- _ RETURN(366); | 1 _ RETURN(365); | 1 _ --------------------------------------------------------------------- Definition of the YEAR_HOURS Rule: DAYS_OF_YEAR is called in as a function to the YEAR_HOURS rule: YEAR_HOURS(YEAR); _ LOCAL NUM_HOURS; _ ------------------------------------------------------------+-------- _ NUM_HOURS = DAYS_OF_YEAR(YEAR) * 24; | 1 _ RETURN(NUM_HOURS); | 2 _ --------------------------------------------------------------------- When YEAR_HOURS is executed with the year 1998 used as the argument it returns the following: RESULT OF RULE YEAR_HOURS IS 8760.