Post Reply 
Loop Forever?
08-20-2015, 03:17 PM (This post was last modified: 08-20-2015 03:26 PM by toml_12953.)
Post: #1
Loop Forever?
In ISO BASIC, there's a way to loop forever (you can always EXIT a loop from within)
Code:

DO
  <code goes here>
LOOP

Is there a way to do that on Prime?

Right now I have this which seems very clumsy:
Code:

REPEAT
  <code goes here>
UNTIL 1≠1;

Tom L

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
08-20-2015, 04:03 PM
Post: #2
RE: Loop Forever?
You can do:
Code:
REPEAT
  <code goes here>
UNTIL 0;
or
Code:
WHILE 1 DO
  <code goes here>
END;
Find all posts by this user
Quote this message in a reply
08-20-2015, 05:28 PM (This post was last modified: 08-20-2015 05:40 PM by smp.)
Post: #3
RE: Loop Forever?
For me,
Code:
WHILE 1 DO
  <your code goes here>
END;
has been something of a standard way to get that done.

smp
Find all posts by this user
Quote this message in a reply
Post Reply 




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