Typos Corrected: Re: Infinitely looping animations...

Marko van Eekelen marko@cs.kun.nl
Thu, 26 Jun 1997 16:55:58 +0200


>Hi..
>
>I've written a program that I want to animate infinitely. The only way I
>can concieve of doing this is an infinite recursion. Obviously, this is not
>a good thing, as requiring the user to kill the app using <ctrl><alt><del>
>(in win95 atleast) is not cool.
> Any suggestions?
>
>-Nick

Dear Nick,

Infinite recursion can be used e.g. when you  write a function 
doing console-like input/output (using stdio from the IO/library). 
As Pieter Koopman stated this will indeed NOT cause stacks or heaps to overflow.

For your problem something similar to the Life demo example (which is included in the 
distribution) seems to be appropriate.

As in the Life example you define a menu system that contains a quit function to stop your program. 
Then you can stop your program in a nice way. 
In such a context a timer can be used to repeatedly draw the next part of your animation (just as the Life program does for its animation).

Sorry for the too fast typing (causing too many errors) in the previous message.

With kind regards,

Marko van Eekelen.
Nijmegen University.