lua-users home
lua-l archive

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


> Or just mutate the iterator inside the loop:
>
>  for a in it do
>    if a == '-f' then
>      name = it()
>      .....

Really may I? I read from the manual that I may not.

- how do you imagine to skip a pair?

for k, v in ipairs(x) do
   if v="-skip" then
       k,v = ipairs(x, k,v )
       continue
       -- eh
       else
          everything
          else
          i
          want
          to
          do
   end
end