Difference between revisions of "Loadfile"

From GiderosMobile
(Created page with "__NOTOC__ '''Available since:''' Gideros 2011.6<br/> === Description === Loads a chunk from the file without execution. If there are no errors, returns the compiled chunk a...")
 
Line 6: Line 6:
 
  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.
 
<source lang="lua">
 
<source lang="lua">
(function), = loadfile(filename,)
+
(function) = loadfile(filename)
 
</source>
 
</source>
'''filename:''' (string) name of the file to load ''''''<br/>
+
'''filename''': (string) name of the file to load ''''''<br/>
 
'''Returns''' (function) compiled chunk as a function; otherwise, returns nil<br/>
 
'''Returns''' (function) compiled chunk as a function; otherwise, returns nil<br/>

Revision as of 10:16, 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)

'filename: (string) name of the file to load '
Returns (function) compiled chunk as a function; otherwise, returns nil