
-----------------------------------
w00tw00t
Tue Sep 28, 2004 9:18 am

Restart the program?
-----------------------------------
Hey im making a program right now that puts stuff in arrays and out to a file and other junk like that.  I was wondering what the code would be to start the program over again without having to exit and go back into it?  Thanks.

-----------------------------------
apomb
Tue Sep 28, 2004 9:55 am


-----------------------------------
put the whole thing into a loop and when the program comes to the end


var  yn : string  
loop
   %your program here
   would you like to restart? (y/n)
   get yn 
   exit when yn = "n"
end loop


-----------------------------------
w00tw00t
Tue Sep 28, 2004 10:41 am


-----------------------------------
thanks man, dont know why i didnt think of it X| lol  i guess i was just hoping there was a command for it.

-----------------------------------
Paul
Tue Sep 28, 2004 2:28 pm


-----------------------------------
Well you could have procedures and then clear the variables when the program is done, then call the procedure again, if you're only starting it over once, if you want to do it multiple times, you still need a loop.

-----------------------------------
Flea
Fri Oct 08, 2004 8:51 pm


-----------------------------------
if youre only repeating the program once, you could use a for loop.

for i : 1 .. 2
(program here)
end for
