Lua宏:尝试调用全局变量‘__def’(一个空值)

尝试运行从http://lua-users.org/wiki/LuaMacros中的dump(x)宏示例:

$ lua -lmacro
Lua 5.2.4  Copyright (C) 1994-2015 Lua.org, PUC-Rio
> __def 'dump(x) print(_STR(x).." = "..tostring(x))'
stdin:1: attempt to call global '__def' (a nil value)
stack traceback:
    stdin:1: in main chunk
    [C]: in ?

系统:Cygwin x64。

对于‘__def’有什么问题的想法吗?谢谢。

点赞