lua-users home
lua-l archive

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


On 06/09/2011 9.37, steve donovan wrote:
Ah, but not always!

f = io.open('errio.lua')
for i = 1,3 do
   print(f:read())
end
print(f:write('hello dolly'))
f:close()

On this machine (Windows XP) that write returns true - a silent error!

That's strange: on my XP, Lua 5.1.2 prints:

 1
 2
 3
 nil     No error        0

Apart from the interesting "No error" error description, it seems to be as expected.
errio.lua contains five lines.

--
  Enrico