We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Brauche Hilfe beim Warten auf Tastendruck
#1
Hallo zusammen,

ich verstehe es nicht warum es nicht funktioniert. Siehe Programm QGHP600.000. Wenn ich den Button Clock anklicke sollen der Wochentag, das Datum und die Uhrzeit angezeigt werden und auf einen Tastendruck gewartet werden. Das Programm reagiert nicht. Es scheint abzustürzen obwohl weiterhin im Textfenster die Anzeige fortlaufend angezeigt wird.

Kann mir bitte jemand helfen, dass es wie gewollt funktioniert?

Vielen Dank
Martin
Reply
#2
Hello.  Shy

First, you need to add a pause of about 50 milliseconds to the "While" loop.

I will continue to study the rest.

Secondly, your "OnButtonClicked" event handling routine does a lot of work.

Moreover, this subroutine calls the second subroutine, which waits for the third subroutine to execute.

I believe that before you start writing PROGRAM CODE, you should create a DIAGRAM that shows the PROGRAM LOGIC.

Programming is the process of CREATING the LOGIC of a future program.
Writing code is just CODING.

Shy

I suggest you create a diagram and start discussing it on our forum. When you see your diagram, then you can easily write the correct code.
Reply
#3
Hab herausgefunden, wie es funktioniert. Siehe GSHW339.000.
[-] The following 1 user Likes martmen's post:
  • AbsoluteBeginner
Reply
#4
Great.  Smile

Have you used a diagram to see your program flow through a logical chain of actions?
Reply
#5
Nein ich habe in TextWindow an unterschiedlichen Stellen ausgegeben. So habe ich herausgefunden, dass bestimmte Programmteile in die Hauptschleife verlegt werden müssen. Ich finde es ist eine Macke von Small Basic. Sei es drum es funktioniert nun. Schauen sie auch den Beitrag:

Mach mit.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)