I have a program that displays a few graphics in sequence. I would like to have a short pause to give me time to view each one. How can I accomplish this?
1 Answer
0
accepted
You have a couple of options for inserting pauses between the displaying of graphics or printing of output.
1. You can insert a pause for a specified number of seconds with the sleep command:
//Draw first graph plotXY(x, y); //Pause for 2 seconds sleep(2); //Draw second graph plotXY(x2, y2);
2. If you would like your graph or data to be displayed until you press a key, you can do that with the GAUSS keyw command:
k = 0; print "press any key to display the next graphic"; do until k != 0; k = keyw(); endo;
When your code reaches the line "k = keyw()", a red cursor will be displayed in the program input/output window and the program will pause until you enter a key in the program input/output window.
Your Answer
1 Answer
You have a couple of options for inserting pauses between the displaying of graphics or printing of output.
1. You can insert a pause for a specified number of seconds with the sleep command:
//Draw first graph plotXY(x, y); //Pause for 2 seconds sleep(2); //Draw second graph plotXY(x2, y2);
2. If you would like your graph or data to be displayed until you press a key, you can do that with the GAUSS keyw command:
k = 0; print "press any key to display the next graphic"; do until k != 0; k = keyw(); endo;
When your code reaches the line "k = keyw()", a red cursor will be displayed in the program input/output window and the program will pause until you enter a key in the program input/output window.