Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error: loop ends every second (solved)
#1
When you press "1" the loop ends every second.

Code:
SUB Menu
DIM k$ AS STRING
CLS
PRINT
DO
  PRINT
  PRINT
  PRINT "MENU"
  PRINT " 1 - Test"
  PRINT " 0 - Exit"
  DO
    k$ = INKEY$
  LOOP UNTIL (k$ >= "0") AND (k$ <= "1") ' loop ends every second
  'LOOP UNTIL k$ <> "" ' runs OK
  'LOOP UNTIL (k$ = "0") OR (k$ = "1") ' runs OK
  'LOOP UNTIL (k$ >= "0") AND (k$ <= "1") ' loop ends every second
  PRINT
  IF k$ = "1" THEN PRINT "Option 1"
LOOP UNTIL k$ = "0"  
PRINT
PRINT
PRINT
END SUB

Menu
Reply
#2
Thanks for reporting. I have reproduced it.  Shy
I'll have a look into it.

I suggest you to join our official Telegram Channel (will send you an invitation link privately).
Reply
#3
Please, try this beta and let me know if it works as expected now:
http://www.boriel.com/files/zxb/zxbasic-...a12.tar.gz
http://www.boriel.com/files/zxb/zxbasic-...beta12.zip
http://www.boriel.com/files/zxb/zxbasic-...-win32.zip
http://www.boriel.com/files/zxb/zxbasic-...x64.tar.gz
http://www.boriel.com/files/zxb/zxbasic-...cos.tar.gz
Reply
#4
Does not work.

When you press "1" the loop ends every second.
Reply
#5
Ok. Try now? (it worked for me).
http://www.boriel.com/files/zxb/zxbasic-...a13.tar.gz
http://www.boriel.com/files/zxb/zxbasic-...beta13.zip
http://www.boriel.com/files/zxb/zxbasic-...-win32.zip
http://www.boriel.com/files/zxb/zxbasic-...x64.tar.gz
http://www.boriel.com/files/zxb/zxbasic-...cos.tar.gz
Reply
#6
Works.
Thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)