lua-users home
lua-l archive

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

> All that said, I can put up with the syntax if it works but I'm not
> if
> your example will work - jump_to_state changes "state" and then when
> resume function is called isn't the PC for the coroutine in the
> that state was originally referring to?   If not is there some kind of
> implicit reset of the program counter to zero?

I said it was seat of the pants untested ;-). I wanted to go home for me
tea. Maybe if the dispatch is in the coroutine and you remember the next
state and change on an update...? I take your point that arbitrary
control flow is more difficult functionally.