The LeapYear
#6
Just updated source code. Worked on it without waiting reply.

Suggest you test more thoroughly than I did in PBMAIN.


Code:
'changed post 1 code to operation per line
'if you like your style it is "legel"
'maybe just me, I figure out what you're were doing
'for example, I couldn't see that you were starting at 29
'because logic ops return -1 (or 0), so + was actually - 1
'when not 0, repeat, REPEAT, if you like it as is okay, but
'it will come back different if I need to read it
#compile exe
#dim all
declare _
function iFeb(byval iJahr as integer)        as integer
function iFeb(byval iJahr as integer) Public as integer
  if iJahr < 1582% then
    function = 29% + ((iJahr mod 4%) <> 0%)
  else
    function = 29% + ((iJahr/4) <> (iJahr\4) or _
                    (iJahr/100) = (iJahr\100) and _
                    (iJahr/400) <> (iJahr\400))
  end if
end function
'Cheers,

(tried make a separate post (twice), this forum combined it with previous)
Reply


Messages In This Thread
The LeapYear - by Andy Dee - 03-07-2025, 04:09 PM
RE: The LeapYear - by Dale Yarker - 03-07-2025, 11:49 PM
RE: The LeapYear - by Andy Dee - 03-08-2025, 01:00 AM
RE: The LeapYear - by Dale Yarker - 03-08-2025, 08:50 AM
RE: The LeapYear - by Andy Dee - 03-08-2025, 11:57 AM
RE: The LeapYear - by Dale Yarker - 03-08-2025, 12:06 PM
RE: The LeapYear - by Andy Dee - 03-08-2025, 03:05 PM
RE: The LeapYear - by Andy Dee - 03-08-2025, 08:34 PM
RE: The LeapYear - by Andy Dee - 03-09-2025, 12:41 AM
RE: The LeapYear - by Dale Yarker - 03-09-2025, 05:30 AM
RE: The LeapYear - by Andy Dee - 03-09-2025, 05:01 PM
RE: The LeapYear - by Dale Yarker - 03-09-2025, 09:18 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)