Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic Misc > PING Judson
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 9 Topic 1365 of 1583
Post > Topic >>

PING Judson

by Nick Cramer <n_cramerSPAM@[EMAIL PROTECTED] > Oct 20, 2007 at 11:50 PM

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~
 




 9 Posts in Topic:
PING Judson
Nick Cramer <n_cramerS  2007-10-20 23:50:33 
Re: PING Judson
"Judson McClendon&qu  2007-10-21 08:49:06 
Re: PING Judson
Nick Cramer <n_cramerS  2007-10-22 09:56:39 
Buerg's LIST [Was: PING Judson]
ppnerkDELETETHIS@[EMAIL P  2007-10-22 11:16:12 
Re: Buerg's LIST [Was: PING Judson]
"Judson McClendon&qu  2007-10-22 07:18:21 
Re: Buerg's LIST [Was: PING Judson]
ppnerkDELETETHIS@[EMAIL P  2007-10-23 10:06:19 
Re: Buerg's LIST [Was: PING Judson]
"Judson McClendon&qu  2007-10-23 06:01:13 
Re: Buerg's LIST [Was: PING Judson]
ak621@[EMAIL PROTECTED]   2007-10-26 16:52:09 
Re: Buerg's LIST [Was: PING Judson]
ak621@[EMAIL PROTECTED]   2007-10-26 16:46:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Oct 12 4:55:24 CDT 2008.