[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Writing to a file.
- From: Gaurav Kumar <gkumar@...>
- Date: Tue, 15 Oct 2002 01:01:48 -0500 (CDT)
Hi all,
I am still in the early stages of learning Lua.
I am using Lua 3.2. I have this problem, i can read from
a file , but cannot write to it.
-- et contains "happy"
k = openfile("et","r")
print(k)
m= read(k,"*l")
print(m)
it works fine
but this does not ?
k = openfile("etc","w")
print(k)
m= write(k,"happy")
print(m)
though a new file is created it has nothing
and userdata:0 is returned from write.
Thanks
Gaurav