On Saturday 11 June 2005 14:15, Roy Vegard Ovesen wrote:
>
> settimer(foo(...), time)
>
> where foo(...) is the function to call and time is the delay in seconds.
> This will call foo(...) in time seconds from when settimer() is called.
>
> Here is a function that repeats, or calls itself every 5 seconds.
>
> foo = func
> {
>       # Do something really neat
>
>       settimer(foo(), 5.0);
> }
>
> This is of course an infinite loop. If you want to stop the loop you have
> to check for some condition and simply not call the settimer function:
>
> foo = func
> {
>       # Do something really neat
>
>       if (stopTheLoop)
>       {
>               # Do nothing
>       }
>       else
>       {
>               settimer(foo(), 5.0);
>       }
> }

Whoops!
Replace foo(*) with foo wherever it appears above.

-- 
Roy Vegard Ovesen

_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to