Difference between revisions of "Io.output"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === When called with a file name, it opens the named file (in text mode), and sets its handle as the defau...")
 
Line 7: Line 7:
 
  In case of errors this function raises the error, instead of returning an error code.
 
  In case of errors this function raises the error, instead of returning an error code.
 
<source lang="lua">
 
<source lang="lua">
(file), = io.output(file,)
+
(file) = io.output(file)
 
</source>
 
</source>
'''file:''' (file) file object to use as default output '''optional'''<br/>
+
'''file''': (file) file object to use as default output '''optional'''<br/>
 
'''Returns''' (file) default output file object<br/>
 
'''Returns''' (file) default output file object<br/>

Revision as of 10:17, 23 August 2018

Available since: Gideros 2011.6

Description

When called with a file name, it opens the named file (in text mode), and sets its handle as the default output file. When called with a file handle, it simply sets this file handle as the default output file. When called without parameters, it returns the current default output file.


In case of errors this function raises the error, instead of returning an error code.
(file) = io.output(file)

file: (file) file object to use as default output optional
Returns (file) default output file object