lua-users home
lua-l archive

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


On Tue, Mar 20, 2012 at 21:49, Elias Barrionovo <elias.tandel@gmail.com> wrote:
> 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!
>

Even the manual (for 5.1 at least) says: This string is exactly what
is used in the standard C function fopen.

-- 
Sent from my toaster.