lua-users home
lua-l archive

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


>Is it still a requirement that the return statement is the last line in a
>function?

Just a small detail: It does not need to be the last line in a function,
but in a block. As lhf pointed out, both

  do return end

and

  if ... then return end

have the return as the last line in the block, and then are correct (and
can be written anywhere).

-- Roberto