lua-users home
lua-l archive

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


> Could anyone explain why the break and retuan must appear as the last statement of a block?

For the return statement, it's because otherwise it may be ambiguous:

	...
	return
	f(1,2,3)
	...

Is this a return with no values or a tail call to f?

The restriction on the break statement is a leftover from an experimental
break-with-labels. "break f(x)" coud be "break f" followed by "(x)".
--lhf