I've got an algorithm. I'd like to pause it at some point and then continue once the user presses a button. How do I do that? I've browsed the documentation, and searched the internet, but no luck yet.
Here's a relevant code snip:
if A[i]>A[i+1]
then
begin
Zameni(i,i+1);
done:=true;
sleep(pauza);
br:=br+1;
end;
Right now, I use sleep (pauza is just a constant, means pause in Serbian). Ideally, I'd like to replace that line with a procedure which would sleep for the interval, or wait for a button press based on a configuration setting.
EDIT1: Ah yes, if it wasn't obvious - it's a graphics application, not console, so slapping a "readln" won't work (sadly).