News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.

Post Reply  Post Thread 
io.write() vs. my_output:write()
Author Message
Senior Member

Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: io.write() vs. my_output:write()

Thanks for the explanation. I had a feeling that it was opening a standard output, but some tests made me wonder. For example, if you do this:

print("some text")

the file is still created, but "some text" is printed to terminal as usual instead of to the file (i'm not sure what would happen in Windows). Maybe print() doesn't go to stdout?

In any case, I prefer the file:write() method. It seems more logical to me that if you want to write to a specific file you'd set up a specific output just for the data you want to write to that file.

I guess it's yet another case of having options, whether you want to use them or not.

07-15-2007 04:13 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
io.write() vs. my_output:write() - mikshaw - 07-15-2007, 04:19 AM
RE: io.write() vs. my_output:write() - mikshaw - 07-15-2007 04:13 PM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: