Re: An introduction to Lua
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: An introduction to Lua
- From: Roberto Ierusalimschy <roberto@...>
- Date: 2017年10月22日 19:40:19 -0200
> Even so the function itself has no name, Lua is simply telling you the
> name of the variable. In fact in this case, the real function is a C
> function named 'str_gsub'.
Correct. Some errors use the name 'string.gsub' because that variable
still refer to the function. If you do the following,
> x = string.gsub
> string.gsub = nil -- important!!
then no error messages (or anything else) will use the name
'string.gsub' for that function.
-- Roberto