lua-users home
lua-l archive

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

I like the coroutine changes; they seem more intuitive.

But: is there any way to tell if a coroutine returned returned due to a
yield, or due to a "return"? (I mean a generalized way, that doesn't depend
on the function "return"ing a special value.)

C.S. Brooks
Professor Fog's Workshop

----- Original Message -----
From: "Roberto Ierusalimschy" <>
To: "Multiple recipients of list" <>
Sent: Tuesday, November 19, 2002 8:06 AM
Subject: incompatibilities to 5.0 beta

> * coroutine.resume works in "protected mode", like pcall. Its first
> return is true or false (absence or presence of errors). If true, the
> other results are the arguments to yield, or the return of the body. If
> false, the other argument is the error message. (The function returned
> by "wrap" does not work in protected mode.)