Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about _KeyDown
#3
DO
    INPUT "Number: ", n!
LOOP UNTIL _KEYDOWN(27)

The loop above can never be terminated because in order to leave the INPUT statement you must press ENTER.

DO
    INPUT "Number: ", n!
LOOP UNTIL n! = 0

The loop above can terminate because it relies on the value of n!
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Reply


Messages In This Thread
Question about _KeyDown - by Kernelpanic - 09-16-2024, 06:46 PM
RE: Question about _KeyDown - by DSMan195276 - 09-16-2024, 06:52 PM
RE: Question about _KeyDown - by TerryRitchie - 09-16-2024, 07:28 PM
RE: Question about _KeyDown - by Kernelpanic - 09-16-2024, 07:44 PM
RE: Question about _KeyDown - by Pete - 09-16-2024, 07:53 PM
RE: Question about _KeyDown - by TerryRitchie - 09-16-2024, 08:00 PM
RE: Question about _KeyDown - by Kernelpanic - 09-16-2024, 09:07 PM
RE: Question about _KeyDown - by Pete - 09-16-2024, 09:41 PM



Users browsing this thread: 4 Guest(s)