How to do an #include ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to do an #include ?

Christophe Gimenez
Hi ! I've not found an #include equivalent in the manual ?

Am I right ? If yes of to include files with LUA ?

Thanks

Reply | Threaded
Open this post in threaded view
|

Re: How to do an #include ?

Alex Sandro Queiroz e Silva
On Wed, 15 Mar 2000, Christophe Gimenez wrote:

> Hi ! I've not found an #include equivalent in the manual ?
> 
> Am I right ? If yes of to include files with LUA ?
> 

	You may use the dofile() function, built-in in Lua.

  --Alex	[hidden email]		Lab. de Computacao Grafica/UFC
-------------------------------------------------------------------------------
"Minha força vem da solidão. Não tenho medo das chuvas tempestuosas nem das
 grandes ventanias soltas, pois eu também sou o escuro da noite."
	- Clarice Lispector 
-------------------------------------------------------------------------------

Reply | Threaded
Open this post in threaded view
|

Re: How to do an #include ?

Erik Hougaard
In reply to this post by Christophe Gimenez
Christophe Gimenez wrote:
> 
> Hi ! I've not found an #include equivalent in the manual ?
> 
> Am I right ? If yes of to include files with LUA ?
> 
> Thanks

Several ways exists .. The easied at first is simply to do a
"dofile(filename)" in your source. When executing gets to that point
that file will be included and executed. 

/Erik