Difference between revisions of "Loadfile"
From OpenEUO
					
										
					
					 (Created page with " loadfile ([filename]) Loads a chunk from file filename.  If there are no errors, returns the compiled chunk as a function; otherwise, returns nil plus the error message. The env...")  | 
				|||
| Line 1: | Line 1: | ||
| − |   loadfile ([filename])  | + |   local f , err = loadfile ([filename])  | 
Loads a chunk from file filename.  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.  | Loads a chunk from file filename.  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.  | ||
| + | |||
| + | |||
| + | [[Dofile]]  | ||
| + | |||
| + | [[Dostring]]  | ||
| + | |||
| + | [[Loadstring]]  | ||
Latest revision as of 18:51, 7 October 2010
local f , err = loadfile ([filename])
Loads a chunk from file filename. 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.