LB Booster
« Nth Day of Month »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:40am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Nth Day of Month  (Read 710 times)
joker
Global Moderator
ImageImageImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 157
xx Re: Nth Day of Month
« Reply #3 on: Sep 5th, 2016, 09:47am »

on Sep 5th, 2016, 08:47am, Richard Russell wrote:
... But the Year 2000 bug is shocking, well spotted. wink


Too funny, Richard! Wasn't that the year that we were all supposed to be slung off the Earth never to be heard from again? Perhaps I exaggerate a bit? cheesy
User IP Logged

Jack Kelly
Full Member
ImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 106
xx Re: Nth Day of Month
« Reply #4 on: Sep 5th, 2016, 11:37am »

I have corrected the issues in the original post, code section. Sorry about the Y2K leap year error. Endless confusion is my normal state-of-mind. Thank you for your feedback. It's always appreciated!
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Nth Day of Month
« Reply #5 on: Sep 5th, 2016, 12:02pm »

on Sep 5th, 2016, 09:47am, pnlawrence wrote:
Wasn't that the year that we were all supposed to be slung off the Earth never to be heard from again?

In all seriousness this conditional test in Jack's program is surprising:

Code:
if yyyy mod 4 = 0 and yyyy<>2000 then 

It was/is quite fortuitous that 2000 (being a multiple-of-400 year) fitted in with the simple leap-year rule because it meant that programs written carelessly, or with an expectation that they wouldn't still be in use by then, nevertheless worked correctly. But there's no accounting for somebody inserting a special test for 2000, when it wasn't special!

If the test had said year<>2100 it would have been correct, and we would have been congratulating Jack for his optimism!

Richard.
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls