lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I mean something like this:

while true do

The primary concern is data loss; the secondary concern is professionalism.
To wit:

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
> do_something
> if something_else then break end
> do_something_more
> end
> --lhf

SpriTec Software