Difference between revisions of "Loadfile"

From GiderosMobile
Line 1: Line 1:
 
__NOTOC__
 
__NOTOC__
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 
'''<translate>Available since</translate>:''' Gideros 2011.6<br/>
 +
'''<translate>Class</translate>:''' [[Special:MyLanguage/(global)|(global)]]<br/>
 
=== <translate>Description</translate> ===
 
=== <translate>Description</translate> ===
 
<translate>Loads a chunk from the file without execution.  
 
<translate>Loads a chunk from the file without execution.  

Revision as of 10:27, 24 August 2018

Available since: Gideros 2011.6
Class: (global)

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