Reply to post: Leap year....

This is why copy'n'paste should be banned from developers' IDEs

Anonymous Coward
Anonymous Coward

Leap year....

Back in 1992 I had to fix a problem in a PL/1 program that was checking if it was a leap year. The program was written in 1986. The code (I forget the syntax, too long ago) was something like :

leapyear = false

if (year = 1988) then leapyear = true;

So it ran for 6 years until it failed. I guess the author never expected it to run that long.

AC, because I still work for the same company, although PL/1 is long gone :)

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Biting the hand that feeds IT © 1998–2019