lua-users home
lua-l archive

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


On Wed, Mar 21, 2012 at 12:17 AM, Minh Ngo <mkngo87@gmail.com> wrote:
> Hello,
>
> I can't quite understand what some of the modes do for io.open as explained
> in 5.1 manual. Specifically, I'm not sure what "r+", "w+", and "a+" modes
> do.

>From what I could grasp from Lua's source [1], it passes the mode
directly to the fopen function from stdio.h [2]. So I'd guess the
exact behavior depends on the underlying C lib... or am I wrong?

[1] http://www.lua.org/source/5.2/liolib.c.html
[2] http://cplusplus.com/reference/clibrary/cstdio/fopen/


-- 
NI!