Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.sys.acorn.programmer > #6401

Re: Director's Calendar - weird bug

From Martin <News03@avisoft.f9.co.uk>
Subject Re: Director's Calendar - weird bug
Newsgroups comp.sys.acorn.programmer
Date 2022-08-03 13:38 +0100
Message-ID <5a122bbbaeNews03@avisoft.f9.co.uk> (permalink)
References <c8cf64115a.harriet@bazleyfamily.co.uk> <483b6a115a.harriet@bazleyfamily.co.uk> <5a11ad2c7ePaul@sprie.nl> <f702c4115a.harriet@bazleyfamily.co.uk>
Organization None

Show all headers | View raw


In article <f702c4115a.harriet@bazleyfamily.co.uk>,
   Harriet Bazley <harriet@bazleyfamily.co.uk> 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. 

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Director's Calendar - weird bug Harriet Bazley <harriet@bazleyfamily.co.uk> - 2022-08-02 02:25 +0100
  Director's Calendar - weird bug Martin <News03@avisoft.f9.co.uk> - 2022-08-02 11:04 +0100
    Re: Director's Calendar - weird bug Harriet Bazley <harriet@bazleyfamily.co.uk> - 2022-08-02 12:06 +0100
  Re: Director's Calendar - weird bug Paul Sprangers <Paul@sprie.nl> - 2022-08-02 15:36 +0200
    Re: Director's Calendar - weird bug Harriet Bazley <harriet@bazleyfamily.co.uk> - 2022-08-02 18:45 +0100
      Director developers (was: Director's Calendar - weird bug) Harriet Bazley <harriet@bazleyfamily.co.uk> - 2022-08-02 20:58 +0100
        Re: Director developers Theo <theom+news@chiark.greenend.org.uk> - 2022-08-04 17:04 +0100
          Re: Director developers Steve Fryatt <news@stevefryatt.org.uk> - 2022-08-04 20:42 +0100
            Re: Director developers Theo <theom+news@chiark.greenend.org.uk> - 2022-08-05 00:00 +0100
            Re: Director developers druck <news@druck.org.uk> - 2022-08-05 12:18 +0100
      Re: Director's Calendar - weird bug Paul Sprangers <Paul@sprie.nl> - 2022-08-03 09:17 +0200
      Re: Director's Calendar - weird bug Martin <News03@avisoft.f9.co.uk> - 2022-08-03 13:38 +0100
        Re: Director's Calendar - weird bug Harriet Bazley <harriet@bazleyfamily.co.uk> - 2022-08-03 14:16 +0100
          Re: Director's Calendar - weird bug Martin <News03@avisoft.f9.co.uk> - 2022-08-03 16:00 +0100
            Re: Director's Calendar - weird bug Harriet Bazley <harriet@bazleyfamily.co.uk> - 2022-08-03 23:35 +0100
          Re: Director's Calendar - weird bug Paul Sprangers <Paul@sprie.nl> - 2022-08-03 20:02 +0200

csiph-web