next up previous contents
Next: Ending a Darwin Session Up: Exploring the Basics Previous: Looping Around

Interrupting Computation

At one time or another, you will get caught in an infinite loop. Here are some particularly simple examples of programs which never terminate.

> do od;

> for i from 1 to 10 do
>   if (i=10) then
>     i:=1;
>   fi;
>   lprint('i = ', i);
> od;

To interrupt the computation, type the <control-c> sequence (press the c key while simultaneously holding down the control (or ctrl) key).

Gaston Gonnet