Lua(來自葡文lua,解月亮)係隻輕量高階多重編程範式程式語言,設計來嵌入應用程式。[3]由於Lua編譯出來嘅位元組碼直譯器係用ANSI C寫,Lua係隻跨平台嘅語言。[4]Lua亦有比較簡單嘅C API嚟嵌入應用程式度。[5]

Lua
編程範式多重編程範式腳本指令式程序式基於原型物件導向)、函數
設計者Roberto Ierusalimschy
Waldemar Celes
Luiz Henrique de Figueiredo
第一次出現1993年, 31年之前 (1993)
穩定版本
5.4.6[1] 喺維基數據度改 / 2023年5月14號年Error: first parameter cannot be parsed as a date or time. (2023年5月14號)
類型系統動態、鴨仔
實作語言ANSI C
操作系統Cross-platform
軟件授權MIT協議
副檔名.lua
網站www.lua.org
Major implementations
Lua, LuaJIT, LuaVela Luvit
Dialects
Metalua, Idle, GSL Shell, Luau
啟發語言
C++CLUModulaSchemeSNOBOL
影響語言
GameMonkeyIoJavaScriptJulia、MiniD、Red、Ring[2]RubySquirrel、MoonScript、C--

可以編譯做Lua嘅語言 編輯

語法 編輯

經典嘅「Hello World」程式可以噉寫:[12]

print("Hello World!")

噉寫都得:

print 'Hello World!'

參考資料 編輯

  1. "[ANN Lua 5.4.6 now available"]; 檢索日期: 2023年5月14號; 作品或名稱使用語言: 英文; 出版日期: 2023年5月14號.
  2. Ring Team (5 December 2017). "The Ring programming language and other languages". ring-lang.net. ring-lang. 原著喺2018年12月25號歸檔. 喺2021年3月11號搵到.
  3. Ierusalimschy, Roberto; de Figueiredo, Luiz Henrique; Filho, Waldemar Celes (June 1996). "Lua—An Extensible Extension Language". Software: Practice and Experience. 26 (6): 635–652. doi:10.1002/(SICI)1097-024X(199606)26:6<635::AID-SPE26>3.0.CO;2-P. 喺24 October 2015搵到.
  4. "About Lua". Lua.org. 喺2011-08-11搵到.
  5. Yuri Takhteyev (21 April 2013). "From Brazil to Wikipedia". Foreign Affairs. 喺25 April 2013搵到.
  6. "Language Guide - MoonScript 0.5.0". moonscript.org. 原先內容歸檔喺2020-11-19. 喺2020-09-25搵到.
  7. leaf (2020-09-23), leafo/moonscript, 原先內容歸檔喺2020-12-02, 喺2020-09-25搵到
  8. Andre Alves Garzia. "Languages that compile to Lua". AndreGarzia.com. 原先內容歸檔喺2020-12-18. 喺September 25, 2020搵到.
  9. "fennel-lang.org".
  10. "Urn: A Lisp implementation for Lua | Urn". urn-lang.com. 喺2021-01-12搵到.
  11. "Amulet". amulet.work. 喺2021-01-12搵到.
  12. "Programming in Lua : 1".

出面網頁 編輯