lua-users home
lua-l archive

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

> You say it must be at least two expressions, but in your example, lines()
> returns only a function, no state.

Like in a multiple assignment, nils are provided when there are not
enough values.

> > Assert returns its argument (if it is not false); in the example this is
> A point I didn't saw in Lua 4.0 manual (the given pseudo-code don't return
> anything).

This is new in 5.0.

> Likewise, I cannot see what closefile() (or now f:close()) returns.

>From the manual:

  Unless otherwise stated, all I/O functions return nil on failure and
  some value different from nil on success.

-- Roberto