lua-users home
lua-l archive

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

On Fri, Jun 19, 2009 at 4:51 PM, Hisham<> wrote:
> This would make 'continue' mean "jump to the top", and would be
> consistent with 'while' and 'for'.

In C, in a 'while', 'continue' jumps the remainder of the loop body
and to the condition. The condition is at the top of the source, but
it's not the top of the loop body. Again, in C, in 'for', 'continue'
jumps to the counting expression and then onto the condition. I tend
to visualise the counting expression at the bottom of the loop body,
even though it is specified above the loop body. Thus the norm is for
'continue' to jump to the condition, and skipping the condition for a
'continue' in a 'repeat' would break this norm.