[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Breaking from infinite loop?
- From: Ando Sonenblick <ando@...>
- Date: Fri, 08 Aug 2003 07:30:00 -0700
I mean something like this:
while true do
The primary concern is data loss; the secondary concern is professionalism.
A user could launch my app, work for hours creating and defining graphic
elements, etc and not yet having saved, open a the lua interactive window (a
window I added to our app ala lua.c) and enter the above script and run it.
If there is no way to force lua out of such an infinite loop, the user is
forced to rudely terminate my app, losing all their hard work (data loss),
and making my app look not terribly professional...
>> Is there a way in lua to break out of an infinite loop? I don't see
>> anything on the web that covers it...
> You mean something like this?
> while true do
> if something_else then break end