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 - 07.03.2025, 05:09 PM
RE: The LeapYear - by Dale Yarker - 08.03.2025, 12:49 AM
RE: The LeapYear - by Andy Dee - 08.03.2025, 02:00 AM
RE: The LeapYear - by Dale Yarker - 08.03.2025, 09:50 AM
RE: The LeapYear - by Andy Dee - 08.03.2025, 12:57 PM
RE: The LeapYear - by Dale Yarker - 08.03.2025, 01:06 PM
RE: The LeapYear - by Andy Dee - 08.03.2025, 04:05 PM
RE: The LeapYear - by Andy Dee - 08.03.2025, 09:34 PM
RE: The LeapYear - by Andy Dee - 09.03.2025, 01:41 AM
RE: The LeapYear - by Dale Yarker - 09.03.2025, 06:30 AM
RE: The LeapYear - by Andy Dee - 09.03.2025, 06:01 PM
RE: The LeapYear - by Dale Yarker - 09.03.2025, 10:18 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)