Talk:Leap year: Difference between revisions

m
→‎REXX Version 4: remove my incorrect claim!
(→‎REXX Version 4: new section)
m (→‎REXX Version 4: remove my incorrect claim!)
 
(One intermediate revision by the same user not shown)
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
--Walter Pachl 08:17, 17 April 2021 (UTC)
Do y=0 To 999
leapyear: procedure; parse arg y /*year could be: Y, YY, YYY, YYYY*/
If leapyear(y)==leapyear(right(y,4,0)) Then ok=ok+1
else Say y leapyear(y) leapyear(right(y,4,0))
End
Say </lang>
shows 1000
<br>Somehow I was mislead:-(
--Walter Pachl 0813:1737, 17 April 2021 (UTC)
2,289

edits