The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
REPEAT . . . UNTIL loop problem
02-13-2021, 10:50 PM (This post was last modified: 02-13-2021 10:51 PM by cahlucas.)
Post: #1
REPEAT . . . UNTIL loop problem
Hi all,
This time I have a loop problem that I cannot solve. For a graphics program, I have a REPEAT - UNTIL loop as the outermost program loop to keep the program running until it ends, see the code below. Somewhere in the code, the value 1 is stored in the variable 'exit' when a certain key is pressed. I get a 'syntax error' when I press the menu key 'Cntrl.', whereby the cursor is just in front of the UNTIL. As far as I can tell there is nothing wrong with the code, but I don't understand where that error message is coming from. Maybe someone can give me an idea to solve this problem. I hope to hear from you soon. Sincerely, Karel.

Code:

 . . .
 LOCAL exit;
 . . .
 exit:=0;
 . . . 
 REPEAT
 . . .
 . . . exit:=1;
 . . . 
 FREEZE;
 UNTIL exit==1;
 . . .

I use HP-16C, WP-34S emulator, HP-35s, HP-48GX, HP-50g, and HP Prime G2.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
REPEAT . . . UNTIL loop problem - cahlucas - 02-13-2021 10:50 PM
RE: REPEAT . . . UNTIL loop problem - jte - 01-20-2023, 02:57 AM



User(s) browsing this thread: 6 Guest(s)