Difference between revisions of "Io.output"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
'''Available since:''' Gideros 2011.6<br/>
+
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
=== Description ===
+
=== <translate>Description</translate> ===
 
<translate>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.  
 
<translate>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.  
  
Line 9: Line 9:
 
(file) = io.output(file)
 
(file) = io.output(file)
 
</source>
 
</source>
=== Parameters ===
+
=== <translate>Parameters</translate> ===
 
'''file''': (file) <translate>file object to use as default output</translate> '''optional'''<br/>
 
'''file''': (file) <translate>file object to use as default output</translate> '''optional'''<br/>
=== Return values ===
+
=== <translate>Return values</translate> ===
'''Returns''' (file) <translate>default output file object</translate><br/>
+
'''<translate>Returns</translate>''' (file) <translate>default output file object</translate><br/>

Revision as of 07:29, 24 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)

Parameters

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

Return values

Returns (file) default output file object