Android 台灣中文網

標題: 【新手】Lua詞法約定 [打印本頁]

作者: swx_9003    時間: 2013-12-10 11:34
標題: 【新手】Lua詞法約定
標示符:字母(letter)或者下劃線開頭的字母、下劃線、數字序列。最好不要使用下劃線加大寫字母的標示符,因為Lua的保留字也是這樣的。 Lua中,letter的含義是依賴於本地環境的。
保留字:以下字符為Lua的保留字,不能當作標識符。

and break do else elseif
end false for function if
in local nil not or
repeat return then true until
  while

注意:Lua是大小寫敏感的。
註釋:單行註釋:--
多行註釋:--[[ --]]




歡迎光臨 Android 台灣中文網 (https://apk.tw/) Powered by Discuz! X3.1