/*REXX*/
/*--- ISLEAP -------------------------------- 1990 - MARK MCDONALD ---*/
/* ISLEAP(CENTURYYEAR)                                                */
/* IS IT A LEAP YEAR?  FORMAT OF X IS YYYY                            */
/* RETURNS:  0 = NOT LEAP YEAR                                        */
/*           1 = IS A LEAP YEAR                                       */
/*--------------------------------------------------------------------*/
   DO CNT = 1950 TO 2050
      T = ISLEAP(CNT)
      IF T = 1 THEN SAY CNT"  "T" <<<<< IS LEAP YEAR"
      IF T = 0 THEN SAY CNT"  "ISLEAP(CNT)
   END
EXIT
/*--------------------------------------------------------------------*/
ISLEAP: PROCEDURE
  PARSE ARG X
  XRET = 0
  IF ((X // 4 = 0) & (X // 100) <> 0) | ((X // 400) = 0) THEN XRET = 1
RETURN XRET
/*--------------------------------------------------------------------*/