lua-users home
lua-l archive

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

Peter Odding wrote:
> (Hit [Send] too soon)
> Note that the repeat until loop is called a busy loop* which Wikipedia
> calls a `naïve attempt at programming' :). The reason I posted it is
> that it's the only way to wait in plain Lua (I think...)
>  - Peter
> *

Assuming Rolf is exclusively using Lua on EccoExt...

>From the Ecco wiki site mentioned below, Ecco, a Win32 app, sounds
like a kind of spreadsheet. The Lua examples there
( looks much
like macros one would write using Excel VB. If EccoExt's Lua can't
be extended using DLLs, then we're stuck with a busy loop method.

Fundamentally, I think there is no practical need for a wait
function, since the intended programming model is much like Excel
VM macros. I took a look at EccoPy, there are no event-driven
functions or things like that, but one can create or open
worksheets, etc., in addition to tabulated data functions.

At first glance, it looks like we can't do any interactive or
timelined stuff, so it is more for advanced data processing and
macro tasks -- you execute a Lua script to get some non-trivial
processing or tasks done. So with EccoExt, perhaps one should
start by focusing on writing scripts that do simple processing
tasks instead, as I did with Excel VB. Please correct me if I am

> Peter Odding wrote:
>> I think Lua doesn't have os.sleep() (the name usually given) because
>> it's not in the C standard. There's a way around it in plain Lua,
>> assuming os.time() uses seconds as its unit (which is the case on at
>> least Windows and Linux):
>>> [snip]
>>> I searched the LUA archive, but only found discussions about
>>> coroutine.yield(). However, I do not understand how to use this or if
>>> they can even be called in the application that I am using (EccoExt
>>> for Ecco Pro. See the Tutorials here
>>> TIA!!

Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia