No worries. FWIW,  I think using the // modulo operator would make your code less verbose and complex ;)

On 2020-04-28 11:14 AM, CM Poncelet wrote:
Yes, you are absolutely right. I thought it was the other way round,
divisble by 100 being leap years and by 400 not leap years.
It should have been
   LEAP  = (YEAR-YEAR%4*4=0 & YEAR-YEAR%100*100¬=0 | YEAR-YEAR%400*400=0)
This does not affect the calculations themselves, but it does report
incorrectly e.g. that 2000.0229 is not valid.
Thanks a lot for pointing this out. Cheers, Chris Poncelet
On 27/04/2020 10:01, David Crayford wrote:
FYI, you have a bug with your leap year calculation. You need to check
if the year is evenly dividable by 100 (which are not leap years
unless evenly divisible by 400).

isleap: procedure
   arg year .
   return (year // 4 = 0 & year // 100 /= 0 ) | year // 400 = 0

On 2020-04-24 2:01 PM, CM Poncelet wrote:
I attach a Rexx program to calculate and display the biorhythm values
for a given date of birth and current or whatever other date.
   If 'management' complains that home workers are not putting enough
effort into their working-from-home time, they can run this thing and
send its output to 'management' just to prove that they are in perfect
working condition and that any slow-down in productivity must be due to
external factors which are wholly beyond their control <g>.
   Cheers, Chris Poncelet (retired sysprog)

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to