Difference between revisions of "Loadfile"

From GiderosMobile
Line 2: Line 2:
 
'''Available since:''' Gideros 2011.6<br/>
 
'''Available since:''' Gideros 2011.6<br/>
 
=== Description ===
 
=== Description ===
Loads a chunk from the file without execution.  
+
<translate>Loads a chunk from the file without execution.  
  
  If there are no errors, returns the compiled chunk as a function; otherwise, returns nil plus the error message. The environment of the returned function is the global environment.
+
  If there are no errors, returns the compiled chunk as a function; otherwise, returns nil plus the error message. The environment of the returned function is the global environment.</translate>
 
<source lang="lua">
 
<source lang="lua">
 
(function) = loadfile(filename)
 
(function) = loadfile(filename)
 
</source>
 
</source>
 
=== Parameters ===
 
=== Parameters ===
'''filename''': (string) name of the file to load <br/>
+
'''filename''': (string) <translate>name of the file to load</translate> <br/>
 
=== Return values ===
 
=== Return values ===
'''Returns''' (function) compiled chunk as a function; otherwise, returns nil<br/>
+
'''Returns''' (function) <translate>compiled chunk as a function; otherwise, returns nil</translate><br/>

Revision as of 13:32, 23 August 2018

Available since: Gideros 2011.6

Description

Loads a chunk from the file without execution.

If there are no errors, returns the compiled chunk as a function; otherwise, returns nil plus the error message. The environment of the returned function is the global environment.
(function) = loadfile(filename)

Parameters

filename: (string) name of the file to load

Return values

Returns (function) compiled chunk as a function; otherwise, returns nil