lua-users home
lua-l archive

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

On Tue, Sep 6, 2011 at 9:21 AM, startx <> wrote:
>  f ='', 'r')
>  success = f:write('ffd')
>  f:close()
> success will be NIL if the file cannot be written to.

Ah, but not always!

f ='errio.lua')
for i = 1,3 do
print(f:write('hello dolly'))

On this machine (Windows XP) that write returns true - a silent error!
Must be Windows weirdness, because this script does behave as you
expect on Linux.

steve d.