Re: Why not Just PHP-stupid include?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Why not Just PHP-stupid include?
 
- From: andre@... 
 
- Date: 2011年10月18日 14:01:07 +0000
 
> Let's say I define 1 function and put it in a file called function.lua,
> it looks something like this:
>
> function silly1() print "reallly long string that greets user" end
>
> and define 1 local variable
> local x = 10
> and put it in another file called local.lua.
You do realize that in your example x is local but silly1 is global, right?
Why don't you declare x as a global? It seems to me that it's what you want.
Cheers,
Andre