我们在识别一个变量的值时,什么时候用2个equals呢?
When do we use 2 equals when identifying the value of a variable?
我正在学习如何使用 LOVE 引擎,它使用 Lua,但是这个引擎无法识别错误,你知道,如果你需要这样做:
if value=1 then
或
if value==1 then
让引擎识别一个变量,所以我问这个是为了防止错误。
if value==1 then etc.
如您所见https://www.lua.org/manual/5.1/manual.html#2.5.2 and here https://www.lua.org/pil/3.2.html or just here http://www.google.com/
我正在学习如何使用 LOVE 引擎,它使用 Lua,但是这个引擎无法识别错误,你知道,如果你需要这样做:
if value=1 then
或
if value==1 then
让引擎识别一个变量,所以我问这个是为了防止错误。
if value==1 then etc.
如您所见https://www.lua.org/manual/5.1/manual.html#2.5.2 and here https://www.lua.org/pil/3.2.html or just here http://www.google.com/