Path: csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!buffer2.nntp.dca1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Wed, 03 Aug 2022 07:36:58 -0500 From: Martin Subject: Re: Director's Calendar - weird bug Newsgroups: comp.sys.acorn.programmer Date: Wed, 03 Aug 2022 13:38:46 +0100 Message-ID: <5a122bbbaeNews03@avisoft.f9.co.uk> References: <483b6a115a.harriet@bazleyfamily.co.uk> <5a11ad2c7ePaul@sprie.nl> User-Agent: Pluto/3.19a (RISC OS/5.29) NewsHound/v1.54 Organization: None Lines: 42 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-uf8pqxlYykhhSeK3PD/+hRzbvQy8WOPwdCxGGoT5jNAlCPG0ffd1xaKfZ7jhBXT4wMwc2xjQ3y+TlFh!z8OaCmshxflh7dldBrbbHYJjHBpWd7pYcn6c30eim4a5oSi4WwNcmA9KNVwWPYAeqXZmC0ny3Doc!suw= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2401 Xref: csiph.com comp.sys.acorn.programmer:6401 In article , Harriet Bazley wrote: > On 2 Aug 2022 as I do recall, > Paul Sprangers wrote: > > Anyhow, it seems that this small change may work, as far as I've > > tested it (admittedly, not very far): > > > > date% = VAL(MID$(time$,5,2)) > > IF date% > 1 THEN > > FOR n=date% TO 2 STEP -1 > > PROCcalday_change(-1) > > NEXT n > > ENDIF Having done a bit more tinkering, I would agree that Paul's suggestion (and no other changes) fixes the bugs as reported, though I arrived a a slightly different solution... date% = VAL(MID$(time$,5,2)) :REM from today's date down to 1st WHILE date% > 1 PROCcalday_change(-1) :REM subtract 1 from calday% date% -= 1 ENDWHILE I also noticed that while the window was open, the processor was being consumed by 60k+ Null Polls/sec ... easily solved by changing SYS "Wimp_Poll",,b% TO r% to SYS "Wimp_Poll",1,b% TO r% I would assign the arrays days$(), monthb$(), monthd$() and leapyrs() by eg: days$() = "","Sun","Mon","Tue","Wed","Thu","Fri","Sat" rather than RESTORE & READ loops, but that is being picky! Martin -- Martin Avison Note that unfortunately this email address will become invalid without notice if (when) any spam is received.