Talk:Leap year: Difference between revisions

m
→‎REXX Version 4: remove my incorrect claim!
m (→‎REXX Version 4: remove my incorrect claim!)
 
Line 12:
 
== REXX Version 4 ==
Actually This seems to be not necessary:<br><br>If a year below 100 is to be used, the year should have leading zeroes added (to make it four digits).
 
Better:
 
Years with 2 digits are padded with the current century
<br><br>If a year below 100 is to be used, the year should have leading zeroes added (to make it four digits).
Years with fewer than 4 digits are padded to the left with zeroes.
<br>
<lang rexx>
<br> '''I think this sentence and the claim below is wrong- Program should only support yy and yyyy'''
ok=0
<br>
Do y=0 To 999
--Walter Pachl 08:17, 17 April 2021 (UTC)
If leapyear(y)==leapyear(right(y,4,0)) Then ok=ok+1
<br>
else Say y leapyear(y) leapyear(right(y,4,0))
leapyear: procedure; parse arg y /*year could be: Y, YY, YYY, YYYY*/
End
Say </lang>
shows 1000
<br>Somehow I was mislead:-(
--Walter Pachl 0813:1737, 17 April 2021 (UTC)
2,289

edits