[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Odd behaviour with multiple return values and varargs
- From: "John Calsbeek" <nexuapex@...>
- Date: Wed, 12 Sep 2007 16:44:04 -0500
Problems with multiple return values not getting truncated:
if not errorCondition then
return someValue -- bad things happen if this is return someValue, nil
return nil, "error message"
-- If the return was someValue, nil there are problems
-- but if the return is specified as above it works fine
-- up until an error. Hopefully the programmer wasn't
-- expecting it to just pass nil to somefunc, 'cause it won't.
somefunc(maybeval(), "some other value")