Difference between revisions of "Loadfile"
From GiderosMobile
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | '''Available since:''' Gideros 2011.6<br/> | + | '''<translate>Available since</translate>:''' Gideros 2011.6<br/> |
− | === Description === | + | === <translate>Description</translate> === |
<translate>Loads a chunk from the file without execution. | <translate>Loads a chunk from the file without execution. | ||
Line 8: | Line 8: | ||
(function) = loadfile(filename) | (function) = loadfile(filename) | ||
</source> | </source> | ||
− | === Parameters === | + | === <translate>Parameters</translate> === |
'''filename''': (string) <translate>name of the file to load</translate> <br/> | '''filename''': (string) <translate>name of the file to load</translate> <br/> | ||
− | === Return values === | + | === <translate>Return values</translate> === |
− | '''Returns''' (function) <translate>compiled chunk as a function; otherwise, returns nil</translate><br/> | + | '''<translate>Returns</translate>''' (function) <translate>compiled chunk as a function; otherwise, returns nil</translate><br/> |
Revision as of 07:27, 24 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