Post Reply 
REPEAT . . . UNTIL loop problem
02-14-2021, 08:09 PM
Post: #11
RE: REPEAT . . . UNTIL loop problem
(02-14-2021 07:51 PM)Gene222 Wrote:  I think toml_12953 got it right with a missing END in an IF statement or something similar. The IF statement with a missing END can be located anywhere in the repeat until block.

PHP Code:
EXPORT Test_Until_1()
BEGIN
  LOCAL y
:=0,exit:=0
  PRINT();
  
REPEAT
    
IF y==3 THEN  // if statement unrelated to the loop exit.
      
y:=y;
    
//END;  // If you leave this out, you'll get an error on the UNTIL statement.
    
PRINT(y);
    
y:=y+1;
    IF 
y==7 THEN  // loop exit
      
exit:=1;
    
END
  
UNTIL exit==1;
END

Dear Mr. Gene,
There is no 'END;' statement forgotten. The 'IF-THEN-END' structure is part of a 'CASE' structure that has been carefully constructed, using the menu from 'Tmplt', in the program editor. Sincerely, Karel.

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 - cahlucas - 02-14-2021 08:09 PM
RE: REPEAT . . . UNTIL loop problem - jte - 01-20-2023, 02:57 AM



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