Difference between revisions of "Io.output"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | + | '''Available since:''' Gideros 2011.6<br/> | |
− | ''' | + | '''Class:''' [[io]]<br/> |
− | ''' | ||
− | |||
− | |||
+ | === 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. | ||
<source lang="lua"> | <source lang="lua"> | ||
(file) = io.output(file) | (file) = io.output(file) | ||
</source> | </source> | ||
− | === | + | |
− | '''file''': (file) | + | '''In case of errors this function raises the error, instead of returning an error code.''' |
− | === | + | |
− | ''' | + | === Parameters === |
+ | '''file''': (file) file object to use as default output '''optional'''<br/> | ||
+ | |||
+ | === Return values === | ||
+ | '''Returns''' (file) default output file object<br/> | ||
{{Io}} | {{Io}} |
Revision as of 06:17, 7 December 2020
Available since: Gideros 2011.6
Class: io
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.
(file) = io.output(file)
In case of errors this function raises the error, instead of returning an error code.
Parameters
file: (file) file object to use as default output optional
Return values
Returns (file) default output file object