Difference between revisions of "Dofile"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== Description ===
Opens the named file and executes its contents as a Lua chunk. When called without arguments, dofile executes the contents of the standard input (stdin). Returns all values returned by the chunk. In case of errors, dofile propagates the error to its caller (that is, dofile does not run in protected mode).
+
<translate>Opens the named file and executes its contents as a Lua chunk. When called without arguments, dofile executes the contents of the standard input (stdin). Returns all values returned by the chunk. In case of errors, dofile propagates the error to its caller (that is, dofile does not run in protected mode).</translate>
 
<source lang="lua">
 
<source lang="lua">
 
  dofile(filename)
 
  dofile(filename)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''filename''': (string) file to execute <br/>
+
'''filename''': (string) <translate>file to execute</translate> <br/>

Revision as of 13:33, 23 August 2018

Available since: Gideros 2011.6

Description

Opens the named file and executes its contents as a Lua chunk. When called without arguments, dofile executes the contents of the standard input (stdin). Returns all values returned by the chunk. In case of errors, dofile propagates the error to its caller (that is, dofile does not run in protected mode).

 dofile(filename)

Parameters

filename: (string) file to execute