Computer Science Canada

Restarting the program

Author:  Big_Tom [ Thu Mar 27, 2003 12:20 pm ]
Post subject:  Restarting the program

How do i make it s that my program will restart after i see what i want to see. For example If i do 2+2 and i get 4 how can i make it so the user choses it to go back to the beginning of the program?

Author:  Tony [ Thu Mar 27, 2003 12:22 pm ]
Post subject: 

you use loops -

the tutorial describes all you need to know about loops + how to use them to move around your program.

Author:  Prince [ Thu Mar 27, 2003 7:34 pm ]
Post subject: 

heres the simplest loop u can use


var key:string(1)
   % ur code here
   put "again? [y/n] "
   getch (key)
   exit when key="n" or key="N"
end loop

easy, no?