Hey Judson,
Thanks very much for that. It was very kind of you.
The double backslashes made QBASIC Win98SE hiccup. When I removed the
second one, it ran fine. The years sound right. I vaguely remember that 5,
6, 11 year cycle. ;-)
I shortened it up to my most optomistic lifespan and ended up with this:
' BIRTHDA1.BAS
'
' Displays Years Mother's Day falls
' on May 12, from 1935 to 2099
'
' Judson D. McClendon
' Sun Valley Systems
'
' madified by Nick Cramer
'
DECLARE FUNCTION WeekDay (Month AS INTEGER, Day AS INTEGER, Year AS
INTEGER) DIM Month AS INTEGER, Day AS INTEGER, Year AS INTEGER, DOW AS
INTEGER
PRINT "Years Your Birthday falls on Mother's Day"
LPRINT "Years your birthday falls on Mothers' Day:"
FOR Year = 1935 TO 2037
IF (WeekDay(5, 12, Year) = 0) THEN
PRINT Year,
LPRINT Year,
END IF
NEXT Year
PRINT
LPRINT
END
FUNCTION WeekDay (Month AS INTEGER, Day AS INTEGER, Year AS INTEGER)
DIM M AS INTEGER, D AS INTEGER, Y AS INTEGER
IF (Month < 3) THEN
Y = Year - 1
M = Month + 12
D = Day
ELSE
Y = Year
M = Month
D = Day
END IF
WeekDay = ((13 * M + 3) \ 5 + D + Y + Y \ 4 - Y \ 100 + Y \ 400 + 1) MOD 7
END FUNCTION
I guess LPRINT doesn't work any more. PRINT TO LPT!? Thanks, again.
--
Nick. Sup****t severely wounded and disabled Veterans and their families!
I've known US vets who served as far back as the Spanish American War.
They
are all my heroes! Thank a Veteran and Sup****t Our Troops. You are not
forgotten. Thanks ! ! ~Semper Fi~


|