Recent

Author Topic: [solved]Keep trying until the condition is met  (Read 832 times)

Dmitri

  • Newbie
  • Posts: 4
[solved]Keep trying until the condition is met
« on: March 06, 2020, 03:00:34 pm »
Hi all,

I have some code:

Code: Pascal  [Select][+][-]
  1. if condition then
  2. begin
  3.   Execute;
  4.   Terminate;
  5. end;

How do I make it so that the program will carry on checking for that condition until it is met, rather than just checking it once, and proceeding with the other code in the program?

Thank you
« Last Edit: March 06, 2020, 03:57:28 pm by Dmitri »

eljo

  • Sr. Member
  • ****
  • Posts: 468
Re: Keep trying until the condition is met
« Reply #1 on: March 06, 2020, 03:05:42 pm »
Code: Pascal  [Select][+][-]
  1. Repeat
  2.  
  3. Until Condition or terminated;
  4. if Condition then execute;
  5. Terminate;
  6.  

Dmitri

  • Newbie
  • Posts: 4
Re: Keep trying until the condition is met
« Reply #2 on: March 06, 2020, 03:57:13 pm »
Thank you eljo!

 

TinyPortal © 2005-2018