CINXE.COM

Wikipedia:Lua - 維基百科,自由嘅百科全書

<!DOCTYPE html> <html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available" lang="yue" dir="ltr"> <head> <meta charset="UTF-8"> <title>Wikipedia:Lua - 維基百科,自由嘅百科全書</title> <script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-sticky-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-feature-night-mode-disabled skin-theme-clientpref-day vector-toc-available";var cookie=document.cookie.match(/(?:^|; )zh_yuewikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat": "yue","wgMonthNames":["","1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],"wgRequestId":"645b46f7-415b-4d50-b390-3907fc1106ad","wgCanonicalNamespace":"Project","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":4,"wgPageName":"Wikipedia:Lua","wgTitle":"Lua","wgCurRevisionId":1582741,"wgRevisionId":1582741,"wgArticleId":119918,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["有腳本錯誤嘅版","基於Lua嘅模","維基百科模組"],"wgPageViewLanguage":"yue","wgPageContentLanguage":"yue","wgPageContentModel":"wikitext","wgRelevantPageName":"Wikipedia:Lua","wgRelevantArticleId":119918,"wgTempUserName":null,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProject":"wikipedia","wgCiteReferencePreviewsActive":true,"wgMediaViewerOnClick":true,"wgMediaViewerEnabledByDefault":true,"wgPopupsFlags":0, "wgVisualEditor":{"pageLanguageCode":"yue","pageLanguageDir":"ltr","pageVariantFallbacks":"yue"},"wgMFDisplayWikibaseDescriptions":{"search":true,"watchlist":true,"tagline":true,"nearby":true},"wgWMESchemaEditAttemptStepOversample":false,"wgWMEPageLength":10000,"ScribuntoErrors":{"959cb5cb":true},"ScribuntoErrors-959cb5cb": "\u003Cp\u003ELua error in package.lua at line 80: module 'Module:CallAssert' not found.\u003C/p\u003E\u003Cp\u003EBacktrace:\u003C/p\u003E\u003Col class=\"scribunto-trace\"\u003E\u003Cli\u003E\u003Cstrong\u003E[C]\u003C/strong\u003E: in function \"error\"\u003C/li\u003E\u003Cli\u003E\u003Cstrong\u003Epackage.lua:80\u003C/strong\u003E: in function \"load\"\u003C/li\u003E\u003Cli\u003E\u003Cstrong\u003Epackage.lua:99\u003C/strong\u003E: in function \"require\"\u003C/li\u003E\u003Cli\u003E\u003Cstrong\u003E\u003Ca href=\"//zh-yue.wikipedia.org/w/index.php?title=%E6%A8%A1%E7%B5%84:Page\u0026amp;action=edit#mw-ce-l1\"\u003E模組:Page:1\u003C/a\u003E\u003C/strong\u003E: in function \"chunk\"\u003C/li\u003E\u003Cli\u003E\u003Cstrong\u003Emw.lua:496\u003C/strong\u003E: ?\u003C/li\u003E\u003Cli\u003E\u003Cstrong\u003E[C]\u003C/strong\u003E: ?\u003C/li\u003E\u003Cli\u003E\u003Cstrong\u003E[C]\u003C/strong\u003E: in function \"getExpandedArgument\"\u003C/li\u003E\u003Cli\u003E\u003Cstrong\u003Emw.lua:177\u003C/strong\u003E: ?\u003C/li\u003E\u003Cli\u003E\u003Cstrong\u003E\u003Ca href=\"//zh-yue.wikipedia.org/w/index.php?title=%E6%A8%A1%E7%B5%84:String\u0026amp;action=edit#mw-ce-l411\"\u003E模組:String:411\u003C/a\u003E\u003C/strong\u003E: in function \"_getParameters\"\u003C/li\u003E\u003Cli\u003E\u003Cstrong\u003E\u003Ca href=\"//zh-yue.wikipedia.org/w/index.php?title=%E6%A8%A1%E7%B5%84:String\u0026amp;action=edit#mw-ce-l357\"\u003E模組:String:357\u003C/a\u003E\u003C/strong\u003E: in function \"chunk\"\u003C/li\u003E\u003Cli\u003E\u003Cstrong\u003Emw.lua:527\u003C/strong\u003E: ?\u003C/li\u003E\u003Cli\u003E\u003Cstrong\u003E[C]\u003C/strong\u003E: ?\u003C/li\u003E\u003C/ol\u003E" ,"wgRelatedArticlesCompat":[],"wgCentralAuthMobileDomain":false,"wgEditSubmitButtonLabelPublish":true,"wgDiscussionToolsFeaturesEnabled":{"replytool":true,"newtopictool":true,"sourcemodetoolbar":true,"topicsubscription":false,"autotopicsub":false,"visualenhancements":false,"visualenhancements_reply":false,"visualenhancements_pageframe":false},"wgDiscussionToolsFallbackEditMode":"visual","wgULSPosition":"interlanguage","wgULSisCompactLinksEnabled":false,"wgVector2022LanguageInHeader":true,"wgULSisLanguageSelectorEmpty":false,"wgWikibaseItemId":"Q6811431","wgCheckUserClientHintsHeadersJsApi":["brands","architecture","bitness","fullVersionList","mobile","model","platform","platformVersion"],"GEHomepageSuggestedEditsEnableTopics":true,"wgGETopicsMatchModeEnabled":false,"wgGEStructuredTaskRejectionReasonTextInputEnabled":false,"wgGELevelingUpEnabledForUser":false};RLSTATE={"ext.gadget.charinsert-styles":"ready","ext.globalCssJs.user.styles":"ready","site.styles":"ready","user.styles": "ready","ext.globalCssJs.user":"ready","user":"ready","user.options":"loading","ext.cite.styles":"ready","ext.pygments":"ready","ext.discussionTools.init.styles":"ready","oojs-ui-core.styles":"ready","oojs-ui.styles.indicators":"ready","mediawiki.widgets.styles":"ready","oojs-ui-core.icons":"ready","skins.vector.search.codex.styles":"ready","skins.vector.styles":"ready","skins.vector.icons":"ready","ext.wikimediamessages.styles":"ready","ext.visualEditor.desktopArticleTarget.noscript":"ready","ext.uls.interlanguage":"ready","wikibase.client.init":"ready","ext.wikimediaBadges":"ready"};RLPAGEMODULES=["ext.cite.ux-enhancements","ext.scribunto.errors","ext.pygments.view","site","mediawiki.page.ready","mediawiki.toc","skins.vector.js","ext.centralNotice.geoIP","ext.centralNotice.startUp","ext.gadget.HanTS-conv","ext.gadget.refToolbar","ext.gadget.charinsert","ext.gadget.internalLinkHelper-altcolor","ext.urlShortener.toolbar","ext.centralauth.centralautologin","mmv.bootstrap","ext.popups", "ext.visualEditor.desktopArticleTarget.init","ext.visualEditor.targetLoader","ext.echo.centralauth","ext.discussionTools.init","ext.eventLogging","ext.wikimediaEvents","ext.navigationTiming","ext.uls.interface","ext.cx.eventlogging.campaigns","wikibase.client.vector-2022","ext.checkUser.clientHints","wikibase.sidebar.tracking"];</script> <script>(RLQ=window.RLQ||[]).push(function(){mw.loader.impl(function(){return["user.options@12s5i",function($,jQuery,require,module){mw.user.tokens.set({"patrolToken":"+\\","watchToken":"+\\","csrfToken":"+\\"}); }];});});</script> <link rel="stylesheet" href="/w/load.php?lang=yue&amp;modules=ext.cite.styles%7Cext.discussionTools.init.styles%7Cext.pygments%2CwikimediaBadges%7Cext.uls.interlanguage%7Cext.visualEditor.desktopArticleTarget.noscript%7Cext.wikimediamessages.styles%7Cmediawiki.widgets.styles%7Coojs-ui-core.icons%2Cstyles%7Coojs-ui.styles.indicators%7Cskins.vector.icons%2Cstyles%7Cskins.vector.search.codex.styles%7Cwikibase.client.init&amp;only=styles&amp;skin=vector-2022"> <script async="" src="/w/load.php?lang=yue&amp;modules=startup&amp;only=scripts&amp;raw=1&amp;skin=vector-2022"></script> <meta name="ResourceLoaderDynamicStyles" content=""> <link rel="stylesheet" href="/w/load.php?lang=yue&amp;modules=ext.gadget.charinsert-styles&amp;only=styles&amp;skin=vector-2022"> <link rel="stylesheet" href="/w/load.php?lang=yue&amp;modules=site.styles&amp;only=styles&amp;skin=vector-2022"> <meta name="generator" content="MediaWiki 1.44.0-wmf.4"> <meta name="referrer" content="origin"> <meta name="referrer" content="origin-when-cross-origin"> <meta name="robots" content="max-image-preview:standard"> <meta name="format-detection" content="telephone=no"> <meta name="viewport" content="width=1120"> <meta property="og:title" content="Wikipedia:Lua - 維基百科,自由嘅百科全書"> <meta property="og:type" content="website"> <link rel="preconnect" href="//upload.wikimedia.org"> <link rel="alternate" media="only screen and (max-width: 640px)" href="//zh-yue.m.wikipedia.org/wiki/Wikipedia:Lua"> <link rel="alternate" type="application/x-wiki" title="編輯" href="/w/index.php?title=Wikipedia:Lua&amp;action=edit"> <link rel="apple-touch-icon" href="/static/apple-touch/wikipedia.png"> <link rel="icon" href="/static/favicon/wikipedia.ico"> <link rel="search" type="application/opensearchdescription+xml" href="/w/rest.php/v1/search" title="維基百科 (yue)"> <link rel="EditURI" type="application/rsd+xml" href="//zh-yue.wikipedia.org/w/api.php?action=rsd"> <link rel="canonical" href="https://zh-yue.wikipedia.org/wiki/Wikipedia:Lua"> <link rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh-yue"> <link rel="alternate" type="application/atom+xml" title="維基百科嘅Atom Feed" href="/w/index.php?title=Special:%E6%9C%80%E8%BF%91%E4%BF%AE%E6%94%B9&amp;feed=atom"> <link rel="dns-prefetch" href="//meta.wikimedia.org" /> <link rel="dns-prefetch" href="//login.wikimedia.org"> </head> <body class="ext-discussiontools-replytool-enabled ext-discussiontools-newtopictool-enabled ext-discussiontools-sourcemodetoolbar-enabled skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-4 ns-subject mw-editable page-Wikipedia_Lua rootpage-Wikipedia_Lua skin-vector-2022 action-view"><a class="mw-jump-link" href="#bodyContent">跳去內容</a> <div class="vector-header-container"> <header class="vector-header mw-header"> <div class="vector-header-start"> <nav class="vector-main-menu-landmark" aria-label="站點"> <div id="vector-main-menu-dropdown" class="vector-dropdown vector-main-menu-dropdown vector-button-flush-left vector-button-flush-right" > <input type="checkbox" id="vector-main-menu-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-main-menu-dropdown" class="vector-dropdown-checkbox " aria-label="主目錄" > <label id="vector-main-menu-dropdown-label" for="vector-main-menu-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-menu mw-ui-icon-wikimedia-menu"></span> <span class="vector-dropdown-label-text">主目錄</span> </label> <div class="vector-dropdown-content"> <div id="vector-main-menu-unpinned-container" class="vector-unpinned-container"> <div id="vector-main-menu" class="vector-main-menu vector-pinnable-element"> <div class="vector-pinnable-header vector-main-menu-pinnable-header vector-pinnable-header-unpinned" data-feature-name="main-menu-pinned" data-pinnable-element-id="vector-main-menu" data-pinned-container-id="vector-main-menu-pinned-container" data-unpinned-container-id="vector-main-menu-unpinned-container" > <div class="vector-pinnable-header-label">主目錄</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-main-menu.pin">移去側欄</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-main-menu.unpin">收埋</button> </div> <div id="p-navigation" class="vector-menu mw-portlet mw-portlet-navigation" > <div class="vector-menu-heading"> 導覽 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-mainpage-description" class="mw-list-item"><a href="/wiki/%E9%A0%AD%E7%89%88" title="睇頭版[z]" accesskey="z"><span>頭版</span></a></li><li id="n-contents" class="mw-list-item"><a href="/wiki/Portal:%E7%9B%AE%E9%8C%84"><span>目錄</span></a></li><li id="n-featuredcontent" class="mw-list-item"><a href="/wiki/Portal:%E6%AD%A3%E5%98%A2"><span>正嘢</span></a></li><li id="n-currentevents" class="mw-list-item"><a href="/wiki/Portal:%E6%99%82%E4%BA%BA%E6%99%82%E4%BA%8B" title="提供而家發生嘅事嘅背景資料"><span>時人時事</span></a></li><li id="n-randompage" class="mw-list-item"><a href="/wiki/Special:%E6%98%AF%E4%BD%86%E4%B8%80%E7%89%88" title="是但載入一版[x]" accesskey="x"><span>是但一版</span></a></li><li id="n-aboutsite" class="mw-list-item"><a href="/wiki/Wikipedia:%E9%97%9C%E6%96%BC"><span>關於維基百科</span></a></li><li id="n-聯絡處" class="mw-list-item"><a href="/wiki/Wikipedia:%E8%81%AF%E7%B5%A1%E6%88%91%E5%93%8B"><span>聯絡處</span></a></li> </ul> </div> </div> <div id="p-interaction" class="vector-menu mw-portlet mw-portlet-interaction" > <div class="vector-menu-heading"> 交流 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="n-說明書" class="mw-list-item"><a href="https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents"><span>說明書</span></a></li><li id="n-城市論壇" class="mw-list-item"><a href="/wiki/Wikipedia:%E5%9F%8E%E5%B8%82%E8%AB%96%E5%A3%87"><span>城市論壇</span></a></li><li id="n-portal" class="mw-list-item"><a href="/wiki/Wikipedia:%E7%A4%BE%E5%8D%80%E5%A4%A7%E5%A0%82" title="關於呢個計劃,你可以做乜,應該要點做"><span>社區大堂</span></a></li><li id="n-recentchanges" class="mw-list-item"><a href="/wiki/Special:%E6%9C%80%E8%BF%91%E4%BF%AE%E6%94%B9" title="列出呢個 wiki 中嘅最近修改[r]" accesskey="r"><span>最近修改</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> <a href="/wiki/%E9%A0%AD%E7%89%88" class="mw-logo"> <img class="mw-logo-icon" src="/static/images/icons/wikipedia.png" alt="" aria-hidden="true" height="50" width="50"> <span class="mw-logo-container skin-invert"> <img class="mw-logo-wordmark" alt="維基百科" src="/static/images/mobile/copyright/wikipedia-wordmark-zh_yue.svg" style="width: 7.5em; height: 1.625em;"> <img class="mw-logo-tagline" alt="" src="/static/images/mobile/copyright/wikipedia-tagline-zh_yue.svg" width="120" height="16" style="width: 7.5em; height: 1em;"> </span> </a> </div> <div class="vector-header-end"> <div id="p-search" role="search" class="vector-search-box-vue vector-search-box-collapses vector-search-box-show-thumbnail vector-search-box-auto-expand-width vector-search-box"> <a href="/wiki/Special:%E6%90%9C%E7%B4%A2" class="cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only search-toggle" title="搵維基百科[f]" accesskey="f"><span class="vector-icon mw-ui-icon-search mw-ui-icon-wikimedia-search"></span> <span>查嘢</span> </a> <div class="vector-typeahead-search-container"> <div class="cdx-typeahead-search cdx-typeahead-search--show-thumbnail cdx-typeahead-search--auto-expand-width"> <form action="/w/index.php" id="searchform" class="cdx-search-input cdx-search-input--has-end-button"> <div id="simpleSearch" class="cdx-search-input__input-wrapper" data-search-loc="header-moved"> <div class="cdx-text-input cdx-text-input--has-start-icon"> <input class="cdx-text-input__input" type="search" name="search" placeholder="搵維基百科" aria-label="搵維基百科" autocapitalize="sentences" title="搵維基百科[f]" accesskey="f" id="searchInput" > <span class="cdx-text-input__icon cdx-text-input__start-icon"></span> </div> <input type="hidden" name="title" value="Special:搜索"> </div> <button class="cdx-button cdx-search-input__end-button">搵嘢</button> </form> </div> </div> </div> <nav class="vector-user-links vector-user-links-wide" aria-label="個人架生"> <div class="vector-user-links-main"> <div id="p-vector-user-menu-preferences" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-userpage" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <nav class="vector-appearance-landmark" aria-label="閱讀設定"> <div id="vector-appearance-dropdown" class="vector-dropdown " title="Change the appearance of the page&#039;s font size, width, and color" > <input type="checkbox" id="vector-appearance-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-appearance-dropdown" class="vector-dropdown-checkbox " aria-label="閱讀設定" > <label id="vector-appearance-dropdown-label" for="vector-appearance-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-appearance mw-ui-icon-wikimedia-appearance"></span> <span class="vector-dropdown-label-text">閱讀設定</span> </label> <div class="vector-dropdown-content"> <div id="vector-appearance-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <div id="p-vector-user-menu-notifications" class="vector-menu mw-portlet emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> <div id="p-vector-user-menu-overflow" class="vector-menu mw-portlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_zh-yue.wikipedia.org&amp;uselang=yue" class=""><span>捐畀維基百科</span></a> </li> <li id="pt-createaccount-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:%E9%96%8B%E6%88%B6&amp;returnto=Wikipedia%3ALua" title="建議你開返個戶口簽到,不過唔做都無所謂。" class=""><span>開戶口</span></a> </li> <li id="pt-login-2" class="user-links-collapsible-item mw-list-item user-links-collapsible-item"><a data-mw="interface" href="/w/index.php?title=Special:%E7%B0%BD%E5%88%B0&amp;returnto=Wikipedia%3ALua" title="唔係是必要簽到,但建議你噉做。[o]" accesskey="o" class=""><span>簽到</span></a> </li> </ul> </div> </div> </div> <div id="vector-user-links-dropdown" class="vector-dropdown vector-user-menu vector-button-flush-right vector-user-menu-logged-out user-links-collapsible-item" title="多啲選項" > <input type="checkbox" id="vector-user-links-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-user-links-dropdown" class="vector-dropdown-checkbox " aria-label="個人架生" > <label id="vector-user-links-dropdown-label" for="vector-user-links-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-ellipsis mw-ui-icon-wikimedia-ellipsis"></span> <span class="vector-dropdown-label-text">個人架生</span> </label> <div class="vector-dropdown-content"> <div id="p-personal" class="vector-menu mw-portlet mw-portlet-personal user-links-collapsible-item" title="用戶選單" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="pt-sitesupport" class="user-links-collapsible-item mw-list-item"><a href="//donate.wikimedia.org/wiki/Special:FundraiserRedirector?utm_source=donate&amp;utm_medium=sidebar&amp;utm_campaign=C13_zh-yue.wikipedia.org&amp;uselang=yue"><span>捐畀維基百科</span></a></li><li id="pt-createaccount" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:%E9%96%8B%E6%88%B6&amp;returnto=Wikipedia%3ALua" title="建議你開返個戶口簽到,不過唔做都無所謂。"><span class="vector-icon mw-ui-icon-userAdd mw-ui-icon-wikimedia-userAdd"></span> <span>開戶口</span></a></li><li id="pt-login" class="user-links-collapsible-item mw-list-item"><a href="/w/index.php?title=Special:%E7%B0%BD%E5%88%B0&amp;returnto=Wikipedia%3ALua" title="唔係是必要簽到,但建議你噉做。[o]" accesskey="o"><span class="vector-icon mw-ui-icon-logIn mw-ui-icon-wikimedia-logIn"></span> <span>簽到</span></a></li> </ul> </div> </div> </div> </div> </nav> </div> </header> </div> <div class="mw-page-container"> <div class="mw-page-container-inner"> <div class="vector-sitenotice-container"> <div id="siteNotice"><!-- CentralNotice --></div> </div> <div class="vector-column-start"> <div class="vector-main-menu-container"> <div id="mw-navigation"> <nav id="mw-panel" class="vector-main-menu-landmark" aria-label="站點"> <div id="vector-main-menu-pinned-container" class="vector-pinned-container"> </div> </nav> </div> </div> <div class="vector-sticky-pinned-container"> <nav id="mw-panel-toc" aria-label="目錄" data-event-name="ui.sidebar-toc" class="mw-table-of-contents-container vector-toc-landmark"> <div id="vector-toc-pinned-container" class="vector-pinned-container"> <div id="vector-toc" class="vector-toc vector-pinnable-element"> <div class="vector-pinnable-header vector-toc-pinnable-header vector-pinnable-header-pinned" data-feature-name="toc-pinned" data-pinnable-element-id="vector-toc" > <h2 class="vector-pinnable-header-label">目錄</h2> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-toc.pin">移去側欄</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-toc.unpin">收埋</button> </div> <ul class="vector-toc-contents" id="mw-panel-toc-list"> <li id="toc-mw-content-text" class="vector-toc-list-item vector-toc-level-1"> <a href="#" class="vector-toc-link"> <div class="vector-toc-text">文頭</div> </a> </li> <li id="toc-簡介" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#簡介"> <div class="vector-toc-text"> <span class="vector-toc-numb">1</span> <span>簡介</span> </div> </a> <button aria-controls="toc-簡介-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>切換去 簡介 細章節</span> </button> <ul id="toc-簡介-sublist" class="vector-toc-list"> <li id="toc-Lua模組用法" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Lua模組用法"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.1</span> <span>Lua模組用法</span> </div> </a> <ul id="toc-Lua模組用法-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-點整一個Lua模組" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#點整一個Lua模組"> <div class="vector-toc-text"> <span class="vector-toc-numb">1.2</span> <span>點整一個Lua模組</span> </div> </a> <ul id="toc-點整一個Lua模組-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-運行模組" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#運行模組"> <div class="vector-toc-text"> <span class="vector-toc-numb">2</span> <span>運行模組</span> </div> </a> <button aria-controls="toc-運行模組-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>切換去 運行模組 細章節</span> </button> <ul id="toc-運行模組-sublist" class="vector-toc-list"> <li id="toc-用參數" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#用參數"> <div class="vector-toc-text"> <span class="vector-toc-numb">2.1</span> <span>用參數</span> </div> </a> <ul id="toc-用參數-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-歷史" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#歷史"> <div class="vector-toc-text"> <span class="vector-toc-numb">3</span> <span>歷史</span> </div> </a> <ul id="toc-歷史-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-關於Lua" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#關於Lua"> <div class="vector-toc-text"> <span class="vector-toc-numb">4</span> <span>關於Lua</span> </div> </a> <ul id="toc-關於Lua-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Unit_testing" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Unit_testing"> <div class="vector-toc-text"> <span class="vector-toc-numb">5</span> <span>Unit testing</span> </div> </a> <ul id="toc-Unit_testing-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Wikipedia-specific_features" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Wikipedia-specific_features"> <div class="vector-toc-text"> <span class="vector-toc-numb">6</span> <span>Wikipedia-specific features</span> </div> </a> <button aria-controls="toc-Wikipedia-specific_features-sublist" class="cdx-button cdx-button--weight-quiet cdx-button--icon-only vector-toc-toggle"> <span class="vector-icon mw-ui-icon-wikimedia-expand"></span> <span>切換去 Wikipedia-specific features 細章節</span> </button> <ul id="toc-Wikipedia-specific_features-sublist" class="vector-toc-list"> <li id="toc-Lua_input_limitations" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Lua_input_limitations"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.1</span> <span>Lua input limitations</span> </div> </a> <ul id="toc-Lua_input_limitations-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-Wikitext" class="vector-toc-list-item vector-toc-level-2"> <a class="vector-toc-link" href="#Wikitext"> <div class="vector-toc-text"> <span class="vector-toc-numb">6.2</span> <span>Wikitext</span> </div> </a> <ul id="toc-Wikitext-sublist" class="vector-toc-list"> </ul> </li> </ul> </li> <li id="toc-Labeling_converted_templates" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#Labeling_converted_templates"> <div class="vector-toc-text"> <span class="vector-toc-numb">7</span> <span>Labeling converted templates</span> </div> </a> <ul id="toc-Labeling_converted_templates-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-睇埋" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#睇埋"> <div class="vector-toc-text"> <span class="vector-toc-numb">8</span> <span>睇埋</span> </div> </a> <ul id="toc-睇埋-sublist" class="vector-toc-list"> </ul> </li> <li id="toc-備註" class="vector-toc-list-item vector-toc-level-1 vector-toc-list-item-expanded"> <a class="vector-toc-link" href="#備註"> <div class="vector-toc-text"> <span class="vector-toc-numb">9</span> <span>備註</span> </div> </a> <ul id="toc-備註-sublist" class="vector-toc-list"> </ul> </li> </ul> </div> </div> </nav> </div> </div> <div class="mw-content-container"> <main id="content" class="mw-body"> <header class="mw-body-header vector-page-titlebar"> <nav aria-label="目錄" class="vector-toc-landmark"> <div id="vector-page-titlebar-toc" class="vector-dropdown vector-page-titlebar-toc vector-button-flush-left" > <input type="checkbox" id="vector-page-titlebar-toc-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-titlebar-toc" class="vector-dropdown-checkbox " aria-label="開/收內容一覽" > <label id="vector-page-titlebar-toc-label" for="vector-page-titlebar-toc-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--icon-only " aria-hidden="true" ><span class="vector-icon mw-ui-icon-listBullet mw-ui-icon-wikimedia-listBullet"></span> <span class="vector-dropdown-label-text">開/收內容一覽</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-titlebar-toc-unpinned-container" class="vector-unpinned-container"> </div> </div> </div> </nav> <h1 id="firstHeading" class="firstHeading mw-first-heading"><span class="mw-page-title-namespace">Wikipedia</span><span class="mw-page-title-separator">:</span><span class="mw-page-title-main">Lua</span></h1> <div id="p-lang-btn" class="vector-dropdown mw-portlet mw-portlet-lang" > <input type="checkbox" id="p-lang-btn-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-p-lang-btn" class="vector-dropdown-checkbox mw-interlanguage-selector" aria-label="去睇另一種語文嘅文章。有65種語言版本。" > <label id="p-lang-btn-label" for="p-lang-btn-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet cdx-button--action-progressive mw-portlet-lang-heading-65" aria-hidden="true" ><span class="vector-icon mw-ui-icon-language-progressive mw-ui-icon-wikimedia-language-progressive"></span> <span class="vector-dropdown-label-text">65種語言</span> </label> <div class="vector-dropdown-content"> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="interlanguage-link interwiki-af mw-list-item"><a href="https://af.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 南非荷蘭文" lang="af" hreflang="af" data-title="Wikipedia:Lua" data-language-autonym="Afrikaans" data-language-local-name="南非荷蘭文" class="interlanguage-link-target"><span>Afrikaans</span></a></li><li class="interlanguage-link interwiki-ar mw-list-item"><a href="https://ar.wikipedia.org/wiki/%D9%88%D9%8A%D9%83%D9%8A%D8%A8%D9%8A%D8%AF%D9%8A%D8%A7:%D9%84%D9%88%D8%A7" title="ويكيبيديا:لوا – 阿拉伯文" lang="ar" hreflang="ar" data-title="ويكيبيديا:لوا" data-language-autonym="العربية" data-language-local-name="阿拉伯文" class="interlanguage-link-target"><span>العربية</span></a></li><li class="interlanguage-link interwiki-as mw-list-item"><a href="https://as.wikipedia.org/wiki/%E0%A7%B1%E0%A6%BF%E0%A6%95%E0%A6%BF%E0%A6%AA%E0%A6%BF%E0%A6%A1%E0%A6%BF%E0%A6%AF%E0%A6%BC%E0%A6%BE:%E0%A6%B2%E0%A7%81%E0%A7%B1%E0%A6%BE" title="ৱিকিপিডিয়া:লুৱা – 阿薩姆文" lang="as" hreflang="as" data-title="ৱিকিপিডিয়া:লুৱা" data-language-autonym="অসমীয়া" data-language-local-name="阿薩姆文" class="interlanguage-link-target"><span>অসমীয়া</span></a></li><li class="interlanguage-link interwiki-azb mw-list-item"><a href="https://azb.wikipedia.org/wiki/%D9%88%DB%8C%DA%A9%DB%8C%E2%80%8C%D9%BE%D8%AF%DB%8C%D8%A7:%D9%84%D9%88%D8%A2" title="ویکی‌پدیا:لوآ – South Azerbaijani" lang="azb" hreflang="azb" data-title="ویکی‌پدیا:لوآ" data-language-autonym="تۆرکجه" data-language-local-name="South Azerbaijani" class="interlanguage-link-target"><span>تۆرکجه</span></a></li><li class="interlanguage-link interwiki-bcl mw-list-item"><a href="https://bcl.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – Central Bikol" lang="bcl" hreflang="bcl" data-title="Wikipedia:Lua" data-language-autonym="Bikol Central" data-language-local-name="Central Bikol" class="interlanguage-link-target"><span>Bikol Central</span></a></li><li class="interlanguage-link interwiki-bg mw-list-item"><a href="https://bg.wikipedia.org/wiki/%D0%A3%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D0%B8" title="Уикипедия:Модули – 保加利亞文" lang="bg" hreflang="bg" data-title="Уикипедия:Модули" data-language-autonym="Български" data-language-local-name="保加利亞文" class="interlanguage-link-target"><span>Български</span></a></li><li class="interlanguage-link interwiki-bh mw-list-item"><a href="https://bh.wikipedia.org/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%95%E0%A4%BF%E0%A4%AA%E0%A5%80%E0%A4%A1%E0%A4%BF%E0%A4%AF%E0%A4%BE:%E0%A4%B2%E0%A5%81%E0%A4%86" title="विकिपीडिया:लुआ – Bhojpuri" lang="bh" hreflang="bh" data-title="विकिपीडिया:लुआ" data-language-autonym="भोजपुरी" data-language-local-name="Bhojpuri" class="interlanguage-link-target"><span>भोजपुरी</span></a></li><li class="interlanguage-link interwiki-bn mw-list-item"><a href="https://bn.wikipedia.org/wiki/%E0%A6%89%E0%A6%87%E0%A6%95%E0%A6%BF%E0%A6%AA%E0%A6%BF%E0%A6%A1%E0%A6%BF%E0%A6%AF%E0%A6%BC%E0%A6%BE:%E0%A6%B2%E0%A7%81%E0%A6%AF%E0%A6%BC%E0%A6%BE" title="উইকিপিডিয়া:লুয়া – 孟加拉文" lang="bn" hreflang="bn" data-title="উইকিপিডিয়া:লুয়া" data-language-autonym="বাংলা" data-language-local-name="孟加拉文" class="interlanguage-link-target"><span>বাংলা</span></a></li><li class="interlanguage-link interwiki-ca mw-list-item"><a href="https://ca.wikipedia.org/wiki/Viquip%C3%A8dia:Lua" title="Viquipèdia:Lua – 加泰羅尼亞文" lang="ca" hreflang="ca" data-title="Viquipèdia:Lua" data-language-autonym="Català" data-language-local-name="加泰羅尼亞文" class="interlanguage-link-target"><span>Català</span></a></li><li class="interlanguage-link interwiki-ckb mw-list-item"><a href="https://ckb.wikipedia.org/wiki/%D9%88%DB%8C%DA%A9%DB%8C%D9%BE%DB%8C%D8%AF%DB%8C%D8%A7:%D9%84%D9%88%D8%A7" title="ویکیپیدیا:لوا – 索拉尼庫爾德文" lang="ckb" hreflang="ckb" data-title="ویکیپیدیا:لوا" data-language-autonym="کوردی" data-language-local-name="索拉尼庫爾德文" class="interlanguage-link-target"><span>کوردی</span></a></li><li class="interlanguage-link interwiki-cs mw-list-item"><a href="https://cs.wikipedia.org/wiki/N%C3%A1pov%C4%9Bda:Moduly" title="Nápověda:Moduly – 捷克文" lang="cs" hreflang="cs" data-title="Nápověda:Moduly" data-language-autonym="Čeština" data-language-local-name="捷克文" class="interlanguage-link-target"><span>Čeština</span></a></li><li class="interlanguage-link interwiki-da mw-list-item"><a href="https://da.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 丹麥文" lang="da" hreflang="da" data-title="Wikipedia:Lua" data-language-autonym="Dansk" data-language-local-name="丹麥文" class="interlanguage-link-target"><span>Dansk</span></a></li><li class="interlanguage-link interwiki-de mw-list-item"><a href="https://de.wikipedia.org/wiki/Hilfe:Lua" title="Hilfe:Lua – 德文" lang="de" hreflang="de" data-title="Hilfe:Lua" data-language-autonym="Deutsch" data-language-local-name="德文" class="interlanguage-link-target"><span>Deutsch</span></a></li><li class="interlanguage-link interwiki-dsb mw-list-item"><a href="https://dsb.wikipedia.org/wiki/Wikipedija:Lua" title="Wikipedija:Lua – 下索布文" lang="dsb" hreflang="dsb" data-title="Wikipedija:Lua" data-language-autonym="Dolnoserbski" data-language-local-name="下索布文" class="interlanguage-link-target"><span>Dolnoserbski</span></a></li><li class="interlanguage-link interwiki-en mw-list-item"><a href="https://en.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 英文" lang="en" hreflang="en" data-title="Wikipedia:Lua" data-language-autonym="English" data-language-local-name="英文" class="interlanguage-link-target"><span>English</span></a></li><li class="interlanguage-link interwiki-eo mw-list-item"><a href="https://eo.wikipedia.org/wiki/Vikipedio:Lua" title="Vikipedio:Lua – 世界文" lang="eo" hreflang="eo" data-title="Vikipedio:Lua" data-language-autonym="Esperanto" data-language-local-name="世界文" class="interlanguage-link-target"><span>Esperanto</span></a></li><li class="interlanguage-link interwiki-es mw-list-item"><a href="https://es.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 西班牙文" lang="es" hreflang="es" data-title="Wikipedia:Lua" data-language-autonym="Español" data-language-local-name="西班牙文" class="interlanguage-link-target"><span>Español</span></a></li><li class="interlanguage-link interwiki-fa mw-list-item"><a href="https://fa.wikipedia.org/wiki/%D9%88%DB%8C%DA%A9%DB%8C%E2%80%8C%D9%BE%D8%AF%DB%8C%D8%A7:%D9%84%D9%88%D8%A2" title="ویکی‌پدیا:لوآ – 波斯文" lang="fa" hreflang="fa" data-title="ویکی‌پدیا:لوآ" data-language-autonym="فارسی" data-language-local-name="波斯文" class="interlanguage-link-target"><span>فارسی</span></a></li><li class="interlanguage-link interwiki-fi mw-list-item"><a href="https://fi.wikipedia.org/wiki/Ohje:Lua" title="Ohje:Lua – 芬蘭文" lang="fi" hreflang="fi" data-title="Ohje:Lua" data-language-autonym="Suomi" data-language-local-name="芬蘭文" class="interlanguage-link-target"><span>Suomi</span></a></li><li class="interlanguage-link interwiki-fr mw-list-item"><a href="https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Lua" title="Wikipédia:Lua – 法文" lang="fr" hreflang="fr" data-title="Wikipédia:Lua" data-language-autonym="Français" data-language-local-name="法文" class="interlanguage-link-target"><span>Français</span></a></li><li class="interlanguage-link interwiki-gl mw-list-item"><a href="https://gl.wikipedia.org/wiki/Wikipedia:M%C3%B3dulos" title="Wikipedia:Módulos – 加里西亞文" lang="gl" hreflang="gl" data-title="Wikipedia:Módulos" data-language-autonym="Galego" data-language-local-name="加里西亞文" class="interlanguage-link-target"><span>Galego</span></a></li><li class="interlanguage-link interwiki-gu mw-list-item"><a href="https://gu.wikipedia.org/wiki/%E0%AA%B5%E0%AA%BF%E0%AA%95%E0%AA%BF%E0%AA%AA%E0%AB%80%E0%AA%A1%E0%AA%BF%E0%AA%AF%E0%AA%BE:Lua" title="વિકિપીડિયા:Lua – 古吉拉特文" lang="gu" hreflang="gu" data-title="વિકિપીડિયા:Lua" data-language-autonym="ગુજરાતી" data-language-local-name="古吉拉特文" class="interlanguage-link-target"><span>ગુજરાતી</span></a></li><li class="interlanguage-link interwiki-he mw-list-item"><a href="https://he.wikipedia.org/wiki/%D7%95%D7%99%D7%A7%D7%99%D7%A4%D7%93%D7%99%D7%94:%D7%9C%D7%95%D7%90%D7%94" title="ויקיפדיה:לואה – 希伯來文" lang="he" hreflang="he" data-title="ויקיפדיה:לואה" data-language-autonym="עברית" data-language-local-name="希伯來文" class="interlanguage-link-target"><span>עברית</span></a></li><li class="interlanguage-link interwiki-hr mw-list-item"><a href="https://hr.wikipedia.org/wiki/Wikipedija:Lua" title="Wikipedija:Lua – 克羅埃西亞文" lang="hr" hreflang="hr" data-title="Wikipedija:Lua" data-language-autonym="Hrvatski" data-language-local-name="克羅埃西亞文" class="interlanguage-link-target"><span>Hrvatski</span></a></li><li class="interlanguage-link interwiki-hsb mw-list-item"><a href="https://hsb.wikipedia.org/wiki/Wikipedija:Lua" title="Wikipedija:Lua – 上索布文" lang="hsb" hreflang="hsb" data-title="Wikipedija:Lua" data-language-autonym="Hornjoserbsce" data-language-local-name="上索布文" class="interlanguage-link-target"><span>Hornjoserbsce</span></a></li><li class="interlanguage-link interwiki-hu mw-list-item"><a href="https://hu.wikipedia.org/wiki/Wikip%C3%A9dia:Lua" title="Wikipédia:Lua – 匈牙利文" lang="hu" hreflang="hu" data-title="Wikipédia:Lua" data-language-autonym="Magyar" data-language-local-name="匈牙利文" class="interlanguage-link-target"><span>Magyar</span></a></li><li class="interlanguage-link interwiki-ia mw-list-item"><a href="https://ia.wikipedia.org/wiki/Wikipedia:Modulo" title="Wikipedia:Modulo – 國際文" lang="ia" hreflang="ia" data-title="Wikipedia:Modulo" data-language-autonym="Interlingua" data-language-local-name="國際文" class="interlanguage-link-target"><span>Interlingua</span></a></li><li class="interlanguage-link interwiki-id mw-list-item"><a href="https://id.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 印尼文" lang="id" hreflang="id" data-title="Wikipedia:Lua" data-language-autonym="Bahasa Indonesia" data-language-local-name="印尼文" class="interlanguage-link-target"><span>Bahasa Indonesia</span></a></li><li class="interlanguage-link interwiki-ilo mw-list-item"><a href="https://ilo.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 伊洛闊文" lang="ilo" hreflang="ilo" data-title="Wikipedia:Lua" data-language-autonym="Ilokano" data-language-local-name="伊洛闊文" class="interlanguage-link-target"><span>Ilokano</span></a></li><li class="interlanguage-link interwiki-it mw-list-item"><a href="https://it.wikipedia.org/wiki/Aiuto:Moduli" title="Aiuto:Moduli – 義大利文" lang="it" hreflang="it" data-title="Aiuto:Moduli" data-language-autonym="Italiano" data-language-local-name="義大利文" class="interlanguage-link-target"><span>Italiano</span></a></li><li class="interlanguage-link interwiki-ja mw-list-item"><a href="https://ja.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 日文" lang="ja" hreflang="ja" data-title="Wikipedia:Lua" data-language-autonym="日本語" data-language-local-name="日文" class="interlanguage-link-target"><span>日本語</span></a></li><li class="interlanguage-link interwiki-ko mw-list-item"><a href="https://ko.wikipedia.org/wiki/%EC%9C%84%ED%82%A4%EB%B0%B1%EA%B3%BC:%EB%A3%A8%EC%95%84" title="위키백과:루아 – 韓文" lang="ko" hreflang="ko" data-title="위키백과:루아" data-language-autonym="한국어" data-language-local-name="韓文" class="interlanguage-link-target"><span>한국어</span></a></li><li class="interlanguage-link interwiki-ku mw-list-item"><a href="https://ku.wikipedia.org/wiki/W%C3%AEk%C3%AEpediya:Lua" title="Wîkîpediya:Lua – 庫爾德文" lang="ku" hreflang="ku" data-title="Wîkîpediya:Lua" data-language-autonym="Kurdî" data-language-local-name="庫爾德文" class="interlanguage-link-target"><span>Kurdî</span></a></li><li class="interlanguage-link interwiki-la mw-list-item"><a href="https://la.wikipedia.org/wiki/Vicipaedia:Lua" title="Vicipaedia:Lua – 拉丁文" lang="la" hreflang="la" data-title="Vicipaedia:Lua" data-language-autonym="Latina" data-language-local-name="拉丁文" class="interlanguage-link-target"><span>Latina</span></a></li><li class="interlanguage-link interwiki-lt mw-list-item"><a href="https://lt.wikipedia.org/wiki/Vikipedija:Lua" title="Vikipedija:Lua – 立陶宛文" lang="lt" hreflang="lt" data-title="Vikipedija:Lua" data-language-autonym="Lietuvių" data-language-local-name="立陶宛文" class="interlanguage-link-target"><span>Lietuvių</span></a></li><li class="interlanguage-link interwiki-lv mw-list-item"><a href="https://lv.wikipedia.org/wiki/Vikip%C4%93dija:Lua" title="Vikipēdija:Lua – 拉脫維亞文" lang="lv" hreflang="lv" data-title="Vikipēdija:Lua" data-language-autonym="Latviešu" data-language-local-name="拉脫維亞文" class="interlanguage-link-target"><span>Latviešu</span></a></li><li class="interlanguage-link interwiki-mr mw-list-item"><a href="https://mr.wikipedia.org/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%95%E0%A4%BF%E0%A4%AA%E0%A5%80%E0%A4%A1%E0%A4%BF%E0%A4%AF%E0%A4%BE:%E0%A4%B2%E0%A5%81%E0%A4%86" title="विकिपीडिया:लुआ – 馬拉地文" lang="mr" hreflang="mr" data-title="विकिपीडिया:लुआ" data-language-autonym="मराठी" data-language-local-name="馬拉地文" class="interlanguage-link-target"><span>मराठी</span></a></li><li class="interlanguage-link interwiki-ms mw-list-item"><a href="https://ms.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 馬來文" lang="ms" hreflang="ms" data-title="Wikipedia:Lua" data-language-autonym="Bahasa Melayu" data-language-local-name="馬來文" class="interlanguage-link-target"><span>Bahasa Melayu</span></a></li><li class="interlanguage-link interwiki-my mw-list-item"><a href="https://my.wikipedia.org/wiki/%E1%80%9D%E1%80%AE%E1%80%80%E1%80%AE%E1%80%95%E1%80%AE%E1%80%B8%E1%80%92%E1%80%AE%E1%80%B8%E1%80%9A%E1%80%AC%E1%80%B8:Lua" title="ဝီကီပီးဒီးယား:Lua – 緬甸文" lang="my" hreflang="my" data-title="ဝီကီပီးဒီးယား:Lua" data-language-autonym="မြန်မာဘာသာ" data-language-local-name="緬甸文" class="interlanguage-link-target"><span>မြန်မာဘာသာ</span></a></li><li class="interlanguage-link interwiki-nn mw-list-item"><a href="https://nn.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 耐諾斯克挪威文" lang="nn" hreflang="nn" data-title="Wikipedia:Lua" data-language-autonym="Norsk nynorsk" data-language-local-name="耐諾斯克挪威文" class="interlanguage-link-target"><span>Norsk nynorsk</span></a></li><li class="interlanguage-link interwiki-no mw-list-item"><a href="https://no.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 巴克摩挪威文" lang="nb" hreflang="nb" data-title="Wikipedia:Lua" data-language-autonym="Norsk bokmål" data-language-local-name="巴克摩挪威文" class="interlanguage-link-target"><span>Norsk bokmål</span></a></li><li class="interlanguage-link interwiki-or mw-list-item"><a href="https://or.wikipedia.org/wiki/%E0%AC%89%E0%AC%87%E0%AC%95%E0%AC%BF%E0%AC%AA%E0%AC%BF%E0%AC%A1%E0%AC%BC%E0%AC%BF%E0%AC%86:%E0%AC%B2%E0%AD%81%E0%AC%86" title="ଉଇକିପିଡ଼ିଆ:ଲୁଆ – 歐利亞文" lang="or" hreflang="or" data-title="ଉଇକିପିଡ଼ିଆ:ଲୁଆ" data-language-autonym="ଓଡ଼ିଆ" data-language-local-name="歐利亞文" class="interlanguage-link-target"><span>ଓଡ଼ିଆ</span></a></li><li class="interlanguage-link interwiki-pa mw-list-item"><a href="https://pa.wikipedia.org/wiki/%E0%A8%B5%E0%A8%BF%E0%A8%95%E0%A9%80%E0%A8%AA%E0%A9%80%E0%A8%A1%E0%A9%80%E0%A8%86:%E0%A8%B8%E0%A8%95%E0%A8%B0%E0%A8%BF%E0%A8%AC%E0%A9%81%E0%A9%B0%E0%A8%9F%E0%A9%8B" title="ਵਿਕੀਪੀਡੀਆ:ਸਕਰਿਬੁੰਟੋ – 旁遮普文" lang="pa" hreflang="pa" data-title="ਵਿਕੀਪੀਡੀਆ:ਸਕਰਿਬੁੰਟੋ" data-language-autonym="ਪੰਜਾਬੀ" data-language-local-name="旁遮普文" class="interlanguage-link-target"><span>ਪੰਜਾਬੀ</span></a></li><li class="interlanguage-link interwiki-pl mw-list-item"><a href="https://pl.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 波蘭文" lang="pl" hreflang="pl" data-title="Wikipedia:Lua" data-language-autonym="Polski" data-language-local-name="波蘭文" class="interlanguage-link-target"><span>Polski</span></a></li><li class="interlanguage-link interwiki-ps mw-list-item"><a href="https://ps.wikipedia.org/wiki/%D9%88%D9%8A%DA%A9%D9%8A%D9%BE%DB%90%DA%89%D9%8A%D8%A7:%D9%84%D9%88%D8%A7" title="ويکيپېډيا:لوا – 普什圖文" lang="ps" hreflang="ps" data-title="ويکيپېډيا:لوا" data-language-autonym="پښتو" data-language-local-name="普什圖文" class="interlanguage-link-target"><span>پښتو</span></a></li><li class="interlanguage-link interwiki-pt mw-list-item"><a href="https://pt.wikipedia.org/wiki/Wikip%C3%A9dia:Lua" title="Wikipédia:Lua – 葡萄牙文" lang="pt" hreflang="pt" data-title="Wikipédia:Lua" data-language-autonym="Português" data-language-local-name="葡萄牙文" class="interlanguage-link-target"><span>Português</span></a></li><li class="interlanguage-link interwiki-ro mw-list-item"><a href="https://ro.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 羅馬尼亞文" lang="ro" hreflang="ro" data-title="Wikipedia:Lua" data-language-autonym="Română" data-language-local-name="羅馬尼亞文" class="interlanguage-link-target"><span>Română</span></a></li><li class="interlanguage-link interwiki-ru mw-list-item"><a href="https://ru.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%8F:%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D0%B8" title="Википедия:Модули – 俄文" lang="ru" hreflang="ru" data-title="Википедия:Модули" data-language-autonym="Русский" data-language-local-name="俄文" class="interlanguage-link-target"><span>Русский</span></a></li><li class="interlanguage-link interwiki-sa mw-list-item"><a href="https://sa.wikipedia.org/wiki/%E0%A4%B5%E0%A4%BF%E0%A4%95%E0%A4%BF%E0%A4%AA%E0%A5%80%E0%A4%A1%E0%A4%BF%E0%A4%AF%E0%A4%BE:Lua" title="विकिपीडिया:Lua – 梵文" lang="sa" hreflang="sa" data-title="विकिपीडिया:Lua" data-language-autonym="संस्कृतम्" data-language-local-name="梵文" class="interlanguage-link-target"><span>संस्कृतम्</span></a></li><li class="interlanguage-link interwiki-sd mw-list-item"><a href="https://sd.wikipedia.org/wiki/%D9%88%DA%AA%D9%8A%D9%BE%D9%8A%DA%8A%D9%8A%D8%A7:%D9%84%D9%8F%D9%88%D9%88%D8%A7" title="وڪيپيڊيا:لُووا – 信德文" lang="sd" hreflang="sd" data-title="وڪيپيڊيا:لُووا" data-language-autonym="سنڌي" data-language-local-name="信德文" class="interlanguage-link-target"><span>سنڌي</span></a></li><li class="interlanguage-link interwiki-sh mw-list-item"><a href="https://sh.wikipedia.org/wiki/Wikipedija:Lua" title="Wikipedija:Lua – 塞爾維亞克羅埃西亞文" lang="sh" hreflang="sh" data-title="Wikipedija:Lua" data-language-autonym="Srpskohrvatski / српскохрватски" data-language-local-name="塞爾維亞克羅埃西亞文" class="interlanguage-link-target"><span>Srpskohrvatski / српскохрватски</span></a></li><li class="interlanguage-link interwiki-si mw-list-item"><a href="https://si.wikipedia.org/wiki/%E0%B7%80%E0%B7%92%E0%B6%9A%E0%B7%92%E0%B6%B4%E0%B7%93%E0%B6%A9%E0%B7%92%E0%B6%BA%E0%B7%8F:%E0%B6%BD%E0%B7%94%E0%B7%80%E0%B7%8F" title="විකිපීඩියා:ලුවා – 僧伽羅文" lang="si" hreflang="si" data-title="විකිපීඩියා:ලුවා" data-language-autonym="සිංහල" data-language-local-name="僧伽羅文" class="interlanguage-link-target"><span>සිංහල</span></a></li><li class="interlanguage-link interwiki-simple mw-list-item"><a href="https://simple.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – Simple English" lang="en-simple" hreflang="en-simple" data-title="Wikipedia:Lua" data-language-autonym="Simple English" data-language-local-name="Simple English" class="interlanguage-link-target"><span>Simple English</span></a></li><li class="interlanguage-link interwiki-sl mw-list-item"><a href="https://sl.wikipedia.org/wiki/Wikipedija:Lua" title="Wikipedija:Lua – 斯洛維尼亞文" lang="sl" hreflang="sl" data-title="Wikipedija:Lua" data-language-autonym="Slovenščina" data-language-local-name="斯洛維尼亞文" class="interlanguage-link-target"><span>Slovenščina</span></a></li><li class="interlanguage-link interwiki-sr mw-list-item"><a href="https://sr.wikipedia.org/wiki/%D0%92%D0%B8%D0%BA%D0%B8%D0%BF%D0%B5%D0%B4%D0%B8%D1%98%D0%B0:%D0%9B%D1%83%D0%B0" title="Википедија:Луа – 塞爾維亞文" lang="sr" hreflang="sr" data-title="Википедија:Луа" data-language-autonym="Српски / srpski" data-language-local-name="塞爾維亞文" class="interlanguage-link-target"><span>Српски / srpski</span></a></li><li class="interlanguage-link interwiki-su mw-list-item"><a href="https://su.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 巽他文" lang="su" hreflang="su" data-title="Wikipedia:Lua" data-language-autonym="Sunda" data-language-local-name="巽他文" class="interlanguage-link-target"><span>Sunda</span></a></li><li class="interlanguage-link interwiki-sv mw-list-item"><a href="https://sv.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 瑞典文" lang="sv" hreflang="sv" data-title="Wikipedia:Lua" data-language-autonym="Svenska" data-language-local-name="瑞典文" class="interlanguage-link-target"><span>Svenska</span></a></li><li class="interlanguage-link interwiki-th mw-list-item"><a href="https://th.wikipedia.org/wiki/%E0%B8%A7%E0%B8%B4%E0%B8%81%E0%B8%B4%E0%B8%9E%E0%B8%B5%E0%B9%80%E0%B8%94%E0%B8%B5%E0%B8%A2:%E0%B8%A5%E0%B8%B9%E0%B8%AD%E0%B8%B2" title="วิกิพีเดีย:ลูอา – 泰文" lang="th" hreflang="th" data-title="วิกิพีเดีย:ลูอา" data-language-autonym="ไทย" data-language-local-name="泰文" class="interlanguage-link-target"><span>ไทย</span></a></li><li class="interlanguage-link interwiki-tr mw-list-item"><a href="https://tr.wikipedia.org/wiki/Vikipedi:Lua" title="Vikipedi:Lua – 土耳其文" lang="tr" hreflang="tr" data-title="Vikipedi:Lua" data-language-autonym="Türkçe" data-language-local-name="土耳其文" class="interlanguage-link-target"><span>Türkçe</span></a></li><li class="interlanguage-link interwiki-uk mw-list-item"><a href="https://uk.wikipedia.org/wiki/%D0%92%D1%96%D0%BA%D1%96%D0%BF%D0%B5%D0%B4%D1%96%D1%8F:%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%96" title="Вікіпедія:Модулі – 烏克蘭文" lang="uk" hreflang="uk" data-title="Вікіпедія:Модулі" data-language-autonym="Українська" data-language-local-name="烏克蘭文" class="interlanguage-link-target"><span>Українська</span></a></li><li class="interlanguage-link interwiki-uz mw-list-item"><a href="https://uz.wikipedia.org/wiki/Vikipediya:Modullar" title="Vikipediya:Modullar – 烏茲別克文" lang="uz" hreflang="uz" data-title="Vikipediya:Modullar" data-language-autonym="Oʻzbekcha / ўзбекча" data-language-local-name="烏茲別克文" class="interlanguage-link-target"><span>Oʻzbekcha / ўзбекча</span></a></li><li class="interlanguage-link interwiki-vi mw-list-item"><a href="https://vi.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 越南文" lang="vi" hreflang="vi" data-title="Wikipedia:Lua" data-language-autonym="Tiếng Việt" data-language-local-name="越南文" class="interlanguage-link-target"><span>Tiếng Việt</span></a></li><li class="interlanguage-link interwiki-wuu mw-list-item"><a href="https://wuu.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 吳語" lang="wuu" hreflang="wuu" data-title="Wikipedia:Lua" data-language-autonym="吴语" data-language-local-name="吳語" class="interlanguage-link-target"><span>吴语</span></a></li><li class="interlanguage-link interwiki-zh mw-list-item"><a href="https://zh.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 中文" lang="zh" hreflang="zh" data-title="Wikipedia:Lua" data-language-autonym="中文" data-language-local-name="中文" class="interlanguage-link-target"><span>中文</span></a></li><li class="interlanguage-link interwiki-zh-min-nan mw-list-item"><a href="https://zh-min-nan.wikipedia.org/wiki/Wikipedia:Lua" title="Wikipedia:Lua – 閩南語" lang="nan" hreflang="nan" data-title="Wikipedia:Lua" data-language-autonym="閩南語 / Bân-lâm-gú" data-language-local-name="閩南語" class="interlanguage-link-target"><span>閩南語 / Bân-lâm-gú</span></a></li> </ul> <div class="after-portlet after-portlet-lang"><span class="wb-langlinks-edit wb-langlinks-link"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q6811431#sitelinks-wikipedia" title="改跨語言拎" class="wbc-editpage">改拎</a></span></div> </div> </div> </div> </header> <div class="vector-page-toolbar"> <div class="vector-page-toolbar-container"> <div id="left-navigation"> <nav aria-label="空間名"> <div id="p-associated-pages" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-associated-pages" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-nstab-project" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Wikipedia:Lua" title="睇吓專案頁[c]" accesskey="c"><span>計劃頁</span></a></li><li id="ca-talk" class="vector-tab-noicon mw-list-item"><a href="/wiki/Wikipedia_talk:Lua" rel="discussion" title="關於內容頁嘅討論[t]" accesskey="t"><span>討論</span></a></li> </ul> </div> </div> <div id="vector-variants-dropdown" class="vector-dropdown emptyPortlet" > <input type="checkbox" id="vector-variants-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-variants-dropdown" class="vector-dropdown-checkbox " aria-label="改語言變體" > <label id="vector-variants-dropdown-label" for="vector-variants-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">粵語</span> </label> <div class="vector-dropdown-content"> <div id="p-variants" class="vector-menu mw-portlet mw-portlet-variants emptyPortlet" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> </ul> </div> </div> </div> </div> </nav> </div> <div id="right-navigation" class="vector-collapsible"> <nav aria-label="外觀"> <div id="p-views" class="vector-menu vector-menu-tabs mw-portlet mw-portlet-views" > <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-view" class="selected vector-tab-noicon mw-list-item"><a href="/wiki/Wikipedia:Lua"><span>閱</span></a></li><li id="ca-edit" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit" title="改呢版嘅代碼[e]" accesskey="e"><span>改源碼</span></a></li><li id="ca-history" class="vector-tab-noicon mw-list-item"><a href="/w/index.php?title=Wikipedia:Lua&amp;action=history" title="呢一頁之前嘅修訂[h]" accesskey="h"><span>睇返紀錄</span></a></li> </ul> </div> </div> </nav> <nav class="vector-page-tools-landmark" aria-label="頁面工具"> <div id="vector-page-tools-dropdown" class="vector-dropdown vector-page-tools-dropdown" > <input type="checkbox" id="vector-page-tools-dropdown-checkbox" role="button" aria-haspopup="true" data-event-name="ui.dropdown-vector-page-tools-dropdown" class="vector-dropdown-checkbox " aria-label="架撐" > <label id="vector-page-tools-dropdown-label" for="vector-page-tools-dropdown-checkbox" class="vector-dropdown-label cdx-button cdx-button--fake-button cdx-button--fake-button--enabled cdx-button--weight-quiet" aria-hidden="true" ><span class="vector-dropdown-label-text">架撐</span> </label> <div class="vector-dropdown-content"> <div id="vector-page-tools-unpinned-container" class="vector-unpinned-container"> <div id="vector-page-tools" class="vector-page-tools vector-pinnable-element"> <div class="vector-pinnable-header vector-page-tools-pinnable-header vector-pinnable-header-unpinned" data-feature-name="page-tools-pinned" data-pinnable-element-id="vector-page-tools" data-pinned-container-id="vector-page-tools-pinned-container" data-unpinned-container-id="vector-page-tools-unpinned-container" > <div class="vector-pinnable-header-label">架撐</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-page-tools.pin">移去側欄</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-page-tools.unpin">收埋</button> </div> <div id="p-cactions" class="vector-menu mw-portlet mw-portlet-cactions emptyPortlet vector-has-collapsible-items" title="多啲選項" > <div class="vector-menu-heading"> 動作 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="ca-more-view" class="selected vector-more-collapsible-item mw-list-item"><a href="/wiki/Wikipedia:Lua"><span>閱</span></a></li><li id="ca-more-edit" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit" title="改呢版嘅代碼[e]" accesskey="e"><span>改源碼</span></a></li><li id="ca-more-history" class="vector-more-collapsible-item mw-list-item"><a href="/w/index.php?title=Wikipedia:Lua&amp;action=history"><span>睇返紀錄</span></a></li> </ul> </div> </div> <div id="p-tb" class="vector-menu mw-portlet mw-portlet-tb" > <div class="vector-menu-heading"> 基本 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="t-whatlinkshere" class="mw-list-item"><a href="/wiki/Special:%E9%82%8A%E5%BA%A6%E9%8F%88%E5%8E%BB%E5%91%A2%E7%89%88/Wikipedia:Lua" title="列出所有連接過嚟呢度嘅頁面[j]" accesskey="j"><span>有乜連過嚟</span></a></li><li id="t-recentchangeslinked" class="mw-list-item"><a href="/wiki/Special:%E5%A4%96%E9%8F%88%E4%BF%AE%E6%94%B9/Wikipedia:Lua" rel="nofollow" title="由呢版連出去嘅版嘅最近修改[k]" accesskey="k"><span>連結頁嘅更改</span></a></li><li id="t-upload" class="mw-list-item"><a href="/wiki/Project:%E4%B8%8A%E8%BC%89" title="上載檔案[u]" accesskey="u"><span>上載檔案</span></a></li><li id="t-specialpages" class="mw-list-item"><a href="/wiki/Special:%E5%B0%88%E9%96%80%E7%89%88" title="所有專門版一覽[q]" accesskey="q"><span>專門版</span></a></li><li id="t-permalink" class="mw-list-item"><a href="/w/index.php?title=Wikipedia:Lua&amp;oldid=1582741" title="呢版呢個修訂嘅永久網址"><span>固定連結</span></a></li><li id="t-info" class="mw-list-item"><a href="/w/index.php?title=Wikipedia:Lua&amp;action=info" title="多啲同呢版有拏褦嘅資料"><span>此版明細</span></a></li><li id="t-urlshortener" class="mw-list-item"><a href="/w/index.php?title=Special:UrlShortener&amp;url=https%3A%2F%2Fzh-yue.wikipedia.org%2Fwiki%2FWikipedia%3ALua"><span>攞短網址</span></a></li><li id="t-urlshortener-qrcode" class="mw-list-item"><a href="/w/index.php?title=Special:QrCode&amp;url=https%3A%2F%2Fzh-yue.wikipedia.org%2Fwiki%2FWikipedia%3ALua"><span>下載QR code</span></a></li> </ul> </div> </div> <div id="p-electronpdfservice-sidebar-portlet-heading" class="vector-menu mw-portlet mw-portlet-electronpdfservice-sidebar-portlet-heading" > <div class="vector-menu-heading"> 打印/匯出 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li id="electron-print_pdf" class="mw-list-item"><a href="/w/index.php?title=Special:DownloadAsPdf&amp;page=Wikipedia%3ALua&amp;action=show-download-screen"><span>下載PDF</span></a></li><li id="t-print" class="mw-list-item"><a href="javascript:print();" rel="alternate" title="呢一版印得嘅版本[p]" accesskey="p"><span>印得嘅版本</span></a></li> </ul> </div> </div> <div id="p-wikibase-otherprojects" class="vector-menu mw-portlet mw-portlet-wikibase-otherprojects" > <div class="vector-menu-heading"> 第啲維基項目 </div> <div class="vector-menu-content"> <ul class="vector-menu-content-list"> <li class="wb-otherproject-link wb-otherproject-commons mw-list-item"><a href="https://commons.wikimedia.org/wiki/Commons:Lua" hreflang="en"><span>維基同享</span></a></li><li class="wb-otherproject-link wb-otherproject-mediawiki mw-list-item"><a href="https://www.mediawiki.org/wiki/Lua/Tutorial" hreflang="en"><span>MediaWiki</span></a></li><li class="wb-otherproject-link wb-otherproject-sources mw-list-item"><a href="https://wikisource.org/wiki/Wikisource:Lua_modules" hreflang="en"><span>Multilingual Wikisource</span></a></li><li id="t-wikibase" class="wb-otherproject-link wb-otherproject-wikibase-dataitem mw-list-item"><a href="https://www.wikidata.org/wiki/Special:EntityPage/Q6811431" title="連到接住資料儲存庫嘅項目[g]" accesskey="g"><span>維基數據項</span></a></li> </ul> </div> </div> </div> </div> </div> </div> </nav> </div> </div> </div> <div class="vector-column-end"> <div class="vector-sticky-pinned-container"> <nav class="vector-page-tools-landmark" aria-label="頁面工具"> <div id="vector-page-tools-pinned-container" class="vector-pinned-container"> </div> </nav> <nav class="vector-appearance-landmark" aria-label="閱讀設定"> <div id="vector-appearance-pinned-container" class="vector-pinned-container"> <div id="vector-appearance" class="vector-appearance vector-pinnable-element"> <div class="vector-pinnable-header vector-appearance-pinnable-header vector-pinnable-header-pinned" data-feature-name="appearance-pinned" data-pinnable-element-id="vector-appearance" data-pinned-container-id="vector-appearance-pinned-container" data-unpinned-container-id="vector-appearance-unpinned-container" > <div class="vector-pinnable-header-label">閱讀設定</div> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-pin-button" data-event-name="pinnable-header.vector-appearance.pin">移去側欄</button> <button class="vector-pinnable-header-toggle-button vector-pinnable-header-unpin-button" data-event-name="pinnable-header.vector-appearance.unpin">收埋</button> </div> </div> </div> </nav> </div> </div> <div id="bodyContent" class="vector-body" aria-labelledby="firstHeading" data-mw-ve-target-container> <div class="vector-body-before-content"> <div class="mw-indicators"> </div> <div id="siteSub" class="noprint">出自維基百科,自由嘅百科全書</div> </div> <div id="contentSub"><div id="mw-content-subtitle"></div></div> <div id="mw-content-text" class="mw-body-content"><div class="mw-content-ltr mw-parser-output" lang="yue" dir="ltr"><p><a href="/wiki/Lua" title="Lua">Lua</a>係隻程式語言,喺維基百科道透過MediaWiki擴充功能<a href="https://www.mediawiki.org/wiki/Extension:Scribunto" class="extiw" title="mw:Extension:Scribunto">Scribunto</a>用到。Lua代碼可以透過Scribunto嘅「{{#invoke:}}」功能嵌入維基模道。呢個擴充功能支援Lua 5.1(2012年版)。 </p><p>啲Lua<a href="/wiki/%E6%BA%90%E7%A2%BC" class="mw-redirect" title="源碼">源碼</a>儲存喺啲叫做「模組」嘅版度(譬如係<a href="/wiki/%E6%A8%A1%E7%B5%84:Example" title="模組:Example">模組:Example</a>)。呢啲獨立嘅模組可以被呼叫(用<code>{{#invoke:&lt;模組名>|&lt;函數名>|(可選) 參數1 | 參數2...}}</code>)。例子: </p> <table class="wikitable"> <tbody><tr> <th>Wikitext </th> <th>結果 </th></tr> <tr> <td><code>{{#invoke:Example|hello}}</code> </td> <td>Hello World! </td></tr></tbody></table> <meta property="mw:PageProp/toc"/> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="簡介" data-mw-thread-id="h-簡介"><span id=".E7.B0.A1.E4.BB.8B"></span><span data-mw-comment-start="" id="h-簡介"></span>簡介<span data-mw-comment-end="h-簡介"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit&amp;section=1" title="編輯小節: 簡介"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-\u7c21\u4ecb","replies":["h-Lua\u6a21\u7d44\u7528\u6cd5-\u7c21\u4ecb","h-\u9ede\u6574\u4e00\u500bLua\u6a21\u7d44-\u7c21\u4ecb"]}}--></div> <div class="mw-heading mw-heading3"><h3 id="Lua模組用法" data-mw-thread-id="h-Lua模組用法-簡介"><span id="Lua.E6.A8.A1.E7.B5.84.E7.94.A8.E6.B3.95"></span><span data-mw-comment-start="" id="h-Lua模組用法-簡介"></span>Lua模組用法<span data-mw-comment-end="h-Lua模組用法-簡介"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit&amp;section=2" title="編輯小節: Lua模組用法"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>用#invoke來調用Lua模組,具體寫法: </p> <pre>{{#invoke:<i>模組名</i>|<i>模組入面嘅函數名</i>|<i>第一參數</i>|<i>第二參數</i>|<i>有名嘅參數個名</i> = <i>對應嘅值</i>}} </pre> <p>例如<a href="/wiki/%E6%A8%A1%E7%B5%84:BaseConvert" title="模組:BaseConvert">模組:BaseConvert</a>可以轉換數值嘅進制: </p> <ul><li><code>{{#invoke:BaseConvert|convert|n=9|base=2}}</code> → 1001 (將十進制9轉成二進制)</li> <li><code>{{#invoke:BaseConvert|convert|n=30|base=16}}</code> → 1E(將十進制30轉成十六進制)</li></ul> <div class="mw-heading mw-heading3"><h3 id="點整一個Lua模組" data-mw-thread-id="h-點整一個Lua模組-簡介"><span id=".E9.BB.9E.E6.95.B4.E4.B8.80.E5.80.8BLua.E6.A8.A1.E7.B5.84"></span><span data-mw-comment-start="" id="h-點整一個Lua模組-簡介"></span>點整一個Lua模組<span data-mw-comment-end="h-點整一個Lua模組-簡介"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit&amp;section=3" title="編輯小節: 點整一個Lua模組"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Lua語言基本語法同埋維基上面Lua庫嘅用法都可以去<a href="https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual" class="extiw" title="mw:Extension:Scribunto/Lua reference manual">Scribunto Lua 参考手册</a>道睇,亦可以參考<a href="/wiki/%E6%A8%A1%E7%B5%84:HelloWorld" title="模組:HelloWorld">模組:HelloWorld</a>,入面有詳細解釋。 </p><p><b>注意</b>:模組名分大小寫。 </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="運行模組" data-mw-thread-id="h-運行模組"><span id=".E9.81.8B.E8.A1.8C.E6.A8.A1.E7.B5.84"></span><span data-mw-comment-start="" id="h-運行模組"></span>運行模組<span data-mw-comment-end="h-運行模組"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit&amp;section=4" title="編輯小節: 運行模組"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-\u904b\u884c\u6a21\u7d44","replies":["h-\u7528\u53c3\u6578-\u904b\u884c\u6a21\u7d44"]}}--></div> <p>模組可以透過#invoke解析器函數喺普通wiki版面度運行。#invoke嘅<a href="/wiki/%E5%8F%A5%E6%B3%95_(%E7%A8%8B%E5%BC%8F%E8%AA%9E%E8%A8%80)" title="句法 (程式語言)">句法</a>同模相近,但亦有啲唔同。最重要嘅分別係你要指明<b>函數名</b>。一個函數係一組指示,接收輸入值,處理輸入,然後返回一個輸出值。<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> This is much like what a template does: you give it arguments, it processes them, and you get a result. However, you can define many functions in one Lua module, whereas you can only define one template on one page. </p><p>Furthermore, you can't just run a Lua module directly – you can only run one of the module's functions. The module is just a container for the functions, and doesn't do anything by itself. So there are two reasons that we need to input a function name: we can't run a module by itself, and without specifying a function name, Lua will not know which function it is we want to run. </p><p>The simplest way to run a module from a wiki page is like this: </p> <pre>{{#invoke:<i>module name</i>|<i>function name</i>}} </pre> <p>For example, we can run <a href="/wiki/%E6%A8%A1%E7%B5%84:Example" title="模組:Example">Module:Example</a> in this way, which has a function named "hello". </p> <ul><li><code>{{#invoke:Example|hello}}</code> → Hello World!</li></ul> <div class="mw-heading mw-heading3"><h3 id="用參數" data-mw-thread-id="h-用參數-運行模組"><span id=".E7.94.A8.E5.8F.83.E6.95.B8"></span><span data-mw-comment-start="" id="h-用參數-運行模組"></span>用參數<span data-mw-comment-end="h-用參數-運行模組"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit&amp;section=5" title="編輯小節: 用參數"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>參數(argument)are passed to modules in the same way that they are passed to templates. Note, however, that the text after the first pipe character is always the function name; the first positional argument is the text after the <i>second</i> pipe. </p> <pre>{{#invoke:<i>module name</i>|<i>function name</i>|<i>first positional argument</i>|<i>second positional argument</i>|<i>named argument</i> = <i>value</i>}} </pre> <p>In <a href="/wiki/%E6%A8%A1%E7%B5%84:Example" title="模組:Example">Module:Example</a>, the "hello_to" function greets different people depending on the first positional argument. It works like this: </p> <ul><li><code>{{#invoke:Example|hello_to|Kate}}</code> → Hello, Kate!</li> <li><code>{{#invoke:Example|hello_to|Fred}}</code> → Hello, Fred!</li></ul> <p>A third function in <a href="/wiki/%E6%A8%A1%E7%B5%84:Example" title="模組:Example">Module:Example</a>, named has "count_fruit" uses the named arguments <code>bananas</code> and <code>apples</code> to count the number of bananas and apples we have. It can be run like this: </p> <ul><li><code>{{#invoke:Example|count_fruit|apples=3|bananas=4}}</code> → I have 4 bananas and 3 apples</li> <li><code>{{#invoke:Example|count_fruit|bananas=5|apples=2}}</code> → I have 5 bananas and 2 apples</li></ul> <p>唔少模組都有解說版,講解邊啲參數可以用,同埋啲參數嘅作用。 </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="歷史" data-mw-thread-id="h-歷史"><span id=".E6.AD.B7.E5.8F.B2"></span><span data-mw-comment-start="" id="h-歷史"></span>歷史<span data-mw-comment-end="h-歷史"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit&amp;section=6" title="編輯小節: 歷史"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-\u6b77\u53f2","replies":[]}}--></div> <p><a href="https://www.mediawiki.org/wiki/Manual:MediaWiki_architecture#Magic_words_and_templates" class="extiw" title="mw:Manual:MediaWiki architecture">Sordid history</a>. {{<a href="/wiki/Template:Qif" title="Template:Qif">qif</a>}}, <a href="https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions" class="extiw" title="mw:Help:Extension:ParserFunctions">ParserFunctions</a>, <a href="https://www.mediawiki.org/wiki/Extension:Lua" class="extiw" title="mw:Extension:Lua">Lua extension</a>, wiki scripting language debated (JavaScript v. Lua), <a href="https://www.mediawiki.org/wiki/Extension:WikiScripts" class="extiw" title="mw:Extension:WikiScripts">mw:Extension:WikiScripts</a>, Tim writes <a href="https://www.mediawiki.org/wiki/Extension:Scribunto" class="extiw" title="mw:Extension:Scribunto">Scribunto</a> with initial support for Lua. </p><p>Discussed for years, Lua was installed in 2012 for testing on <a href="https://test2.wikipedia.org/wiki/" class="extiw" title="test2wiki:">test2.wikipedia.org</a>, with open invitation to all editors to experiment with developing Lua modules. Lua was installed on the English Wikipedia in February 2013, after testing on mediawiki.org and Wikimedia test wikis. </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="關於Lua" data-mw-thread-id="h-關於Lua"><span id=".E9.97.9C.E6.96.BCLua"></span><span data-mw-comment-start="" id="h-關於Lua"></span>關於Lua<span data-mw-comment-end="h-關於Lua"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit&amp;section=7" title="編輯小節: 關於Lua"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-\u95dc\u65bcLua","replies":[]}}--></div> <dl><dd><i>See also <a href="/wiki/File:WMF_Tech_Talk_2013-02-28_slides_-_Scribunto_presentation.pdf" title="File:WMF Tech Talk 2013-02-28 slides - Scribunto presentation.pdf">Brad Jorsch's short presentation for a basic example of how to convert a wikitext template into a Lua module.</a></i></dd></dl> <p>Lua is a <a href="/w/index.php?title=Scripting_language&amp;action=edit&amp;redlink=1" class="new" title="Scripting language (無呢版)">scripting language</a> which can be used to analyze data, calculate expressions, and format results using functions or <a href="/w/index.php?title=Object-oriented_programming&amp;action=edit&amp;redlink=1" class="new" title="Object-oriented programming (無呢版)">object-oriented programming</a>. Although some Lua scripts can be kept simple, for easy understanding, Lua allows complex structures including tables, dynamic functions, and <a href="/w/index.php?title=Associative_array&amp;action=edit&amp;redlink=1" class="new" title="Associative array (無呢版)">associative arrays</a> where index <a href="/w/index.php?title=Subscript&amp;action=edit&amp;redlink=1" class="new" title="Subscript (無呢版)">subscripts</a> can be words as well as index numbers. Lua also supports <a href="/w/index.php?title=Recursion&amp;action=edit&amp;redlink=1" class="new" title="Recursion (無呢版)">recursion</a> of re-nested functions, so care should be taken to avoid excessive complexity where other users would not understand how to maintain a Lua module. The following is the source code of the module used for the examples above. </p> <div class="mw-highlight mw-highlight-lang-lua mw-content-ltr" dir="ltr"><pre><span></span><span class="o">&lt;</span><span class="n">strong</span> <span class="n">class</span><span class="o">=</span><span class="s2">"error"</span><span class="o">>&lt;</span><span class="n">span</span> <span class="n">class</span><span class="o">=</span><span class="s2">"scribunto-error mw-scribunto-error-959cb5cb"</span><span class="o">></span><span class="n">Lua</span> <span class="nb">error</span> <span class="kr">in</span> <span class="n">package</span><span class="p">.</span><span class="n">lua</span> <span class="n">at</span> <span class="n">line</span> <span class="mi">80</span><span class="p">:</span> <span class="n">module</span> <span class="s1">'Module:CallAssert'</span> <span class="ow">not</span> <span class="n">found</span><span class="p">.</span><span class="o">&lt;/</span><span class="n">span</span><span class="o">>&lt;/</span><span class="n">strong</span><span class="o">></span> </pre></div> <p>A sample of Lua is highlighted by tag "&lt;syntaxhighlight lang="lua">...&lt;/syntaxhighlight>" placed around the Lua source code. To view some more complex examples of Lua, see article: "<a href="/w/index.php?title=Lua_(programming_language)&amp;action=edit&amp;redlink=1" class="new" title="Lua (programming language) (無呢版)">Lua (programming language)</a>". </p><p>For instructions on how to use Lua within MediaWiki (and hence Wikipedia), see <a href="https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual" class="extiw" title="mw:Extension:Scribunto/Lua reference manual">mw:Extension:Scribunto/Lua reference manual</a>. </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Unit_testing" data-mw-thread-id="h-Unit_testing"><span data-mw-comment-start="" id="h-Unit_testing"></span>Unit testing<span data-mw-comment-end="h-Unit_testing"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit&amp;section=8" title="編輯小節: Unit testing"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Unit_testing","replies":[]}}--></div> <div role="note" class="hatnote">睇埋:<a href="/w/index.php?title=Category:Modules_for_test_tools&amp;action=edit&amp;redlink=1" class="new" title="Category:Modules for test tools (無呢版)">Category:Modules for test tools</a></div> <p>A few <a href="/w/index.php?title=Unit_test&amp;action=edit&amp;redlink=1" class="new" title="Unit test (無呢版)">unit testing</a> frameworks are available for Lua scripts on Wikipedia. These allow an editor to execute the module with a given set of inputs and verify that the expected outputs are produced. They are useful for rapidly detecting <a href="/w/index.php?title=Software_regression&amp;action=edit&amp;redlink=1" class="new" title="Software regression (無呢版)">software regressions</a>, where modifications to a script introduce new (or identify old) problems. </p><p>By convention, unit tests for a module like <a href="/wiki/%E6%A8%A1%E7%B5%84:Example" title="模組:Example">Module:Example</a> are placed in <a href="/w/index.php?title=%E6%A8%A1%E7%B5%84:Example/testcases&amp;action=edit&amp;redlink=1" class="new" title="模組:Example/testcases (無呢版)">Module:Example/testcases</a>, and are executed on <a href="/w/index.php?title=%E6%A8%A1%E7%B5%84%E8%A8%8E%E8%AB%96:Example/testcases&amp;action=edit&amp;redlink=1" class="new" title="模組討論:Example/testcases (無呢版)">Module talk:Example/testcases</a>. </p><p><a href="/wiki/%E6%A8%A1%E7%B5%84:ScribuntoUnit" title="模組:ScribuntoUnit">Module:ScribuntoUnit</a> and <a href="/wiki/%E6%A8%A1%E7%B5%84:UnitTests" title="模組:UnitTests">Module:UnitTests</a> are the more-used test frameworks. <a href="/w/index.php?title=Category:Modules_for_test_tools&amp;action=edit&amp;redlink=1" class="new" title="Category:Modules for test tools (無呢版)">Category:Modules for test tools</a> has a few other to review which may be interesting. </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Wikipedia-specific_features" data-mw-thread-id="h-Wikipedia-specific_features"><span data-mw-comment-start="" id="h-Wikipedia-specific_features"></span>Wikipedia-specific features<span data-mw-comment-end="h-Wikipedia-specific_features"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit&amp;section=9" title="編輯小節: Wikipedia-specific features"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Wikipedia-specific_features","replies":["h-Lua_input_limitations-Wikipedia-specific_features","h-Wikitext-Wikipedia-specific_features"]}}--></div> <p>Overall: Lua can only get input as text strings passed to the <code>{{#invoke:}}</code> and what can be fetched via mw.title.new(...):getContent() and frame:expandTemplate(). Lua output will not be preprocessed unless frame:preprocess() is explicitly called, meaning that template calls, parser functions, etc. in the output will not work correctly. Also, all Lua in the page is limited to 10 seconds CPU time (you can look in the source code of a rendered page to see how long a template or module took to parse). And relative to standard Lua, Scribunto's Lua lacks all sorts of functions (see <a href="https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#Differences_from_standard_Lua" class="extiw" title="mw:Extension:Scribunto/Lua reference manual">mw:Extension:Scribunto/Lua reference manual § Differences from standard Lua</a>). </p> <div class="mw-heading mw-heading3"><h3 id="Lua_input_limitations" data-mw-thread-id="h-Lua_input_limitations-Wikipedia-specific_features"><span data-mw-comment-start="" id="h-Lua_input_limitations-Wikipedia-specific_features"></span>Lua input limitations<span data-mw-comment-end="h-Lua_input_limitations-Wikipedia-specific_features"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit&amp;section=10" title="編輯小節: Lua input limitations"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Lua code in Scribunto is only run when the page is being parsed. Therefore, the only user input that Lua can receive is by <i>page editing</i> – it cannot create a box that calculates the square root of a number you type in, or recalculate a piece of the Mandelbrot set depending on which part of the parent set you click on. The input Lua can receive includes any transcludeable text page on Wikipedia. This does <i>not</i> include graphics files (not even <a href="/w/index.php?title=Wikipedia:SVG_help&amp;action=edit&amp;redlink=1" class="new" title="Wikipedia:SVG help (無呢版)">.SVG</a> files, although they are actually text, unless you cut and paste it onto a Wiki text page), the list of pages listed in a <a href="/w/index.php?title=Help:Category&amp;action=edit&amp;redlink=1" class="new" title="Help:Category (無呢版)">category</a>, nor the contents of <a href="/wiki/Wikipedia:Transclusion#Special_pages" class="mw-redirect" title="Wikipedia:Transclusion">non-transcludeable</a> <a href="/w/index.php?title=Help:Special&amp;action=edit&amp;redlink=1" class="new" title="Help:Special (無呢版)">special pages</a>. </p> <div class="mw-heading mw-heading3"><h3 id="Wikitext" data-mw-thread-id="h-Wikitext-Wikipedia-specific_features"><span data-mw-comment-start="" id="h-Wikitext-Wikipedia-specific_features"></span>Wikitext<span data-mw-comment-end="h-Wikitext-Wikipedia-specific_features"></span></h3><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit&amp;section=11" title="編輯小節: Wikitext"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span></div> <p>Transcluded Wikipedia headers frequently contain a hidden code such as "UNIQ5ae8f2aa414ff233-h-3--QINU" which may need to be stripped out in order for them to be parsed effectively. </p><p>Wikilinks using the <a href="/w/index.php?title=Wikipedia:Pipe_trick&amp;action=edit&amp;redlink=1" class="new" title="Wikipedia:Pipe trick (無呢版)">Pipe trick</a> <kbd>[[Wikipedia:Help| ]]</kbd> won't work if returned as output – they need to be written explicitly as <kbd>[[Wikipedia:Help|Help]]</kbd>. Other pre-save transforms, such as replacing <kbd>~~~~</kbd> with signatures, will also fail to be processed. Template transclusions, parser function calls, and variable substitutions (i.e. anything with a <code>{{...}}</code>) will not be processed, nor will tags such as <code style="white-space:nowrap">&lt;ref></code> or <code style="white-space:nowrap">&lt;nowiki></code>. </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="Labeling_converted_templates" data-mw-thread-id="h-Labeling_converted_templates"><span data-mw-comment-start="" id="h-Labeling_converted_templates"></span>Labeling converted templates<span data-mw-comment-end="h-Labeling_converted_templates"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit&amp;section=12" title="編輯小節: Labeling converted templates"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Labeling_converted_templates","replies":[]}}--></div> <style data-mw-deduplicate="TemplateStyles:r2009785">.mw-parser-output .ombox{margin:4px 0;border-collapse:collapse;border:1px solid #a2a9b1;background-color:#f8f9fa;box-sizing:border-box}.mw-parser-output .ombox.mbox-small{font-size:88%;line-height:1.25em}.mw-parser-output .ombox-speedy{border:2px solid #b32424;background-color:#fee7e6}.mw-parser-output .ombox-delete{border:2px solid #b32424}.mw-parser-output .ombox-content{border:1px solid #f28500}.mw-parser-output .ombox-style{border:1px solid #fc3}.mw-parser-output .ombox-move{border:1px solid #9932cc}.mw-parser-output .ombox-protection{border:2px solid #a2a9b1}.mw-parser-output .ombox .mbox-text{border:none;padding:0.25em 0.9em;width:100%}.mw-parser-output .ombox .mbox-image{border:none;padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .ombox .mbox-imageright{border:none;padding:2px 0.9em 2px 0;text-align:center}.mw-parser-output .ombox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ombox .mbox-invalid-type{text-align:center}@media(min-width:720px){.mw-parser-output .ombox{margin:4px 10%}.mw-parser-output .ombox.mbox-small{clear:right;float:right;margin:4px 0 4px 1em;width:238px}}</style><table class="plainlinks ombox mbox-small ombox-notice" role="presentation"><tbody><tr><td class="mbox-image"><span typeof="mw:File"><span><img alt="" src="//upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Lua-Logo.svg/30px-Lua-Logo.svg.png" decoding="async" width="30" height="30" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Lua-Logo.svg/45px-Lua-Logo.svg.png 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Lua-Logo.svg/60px-Lua-Logo.svg.png 2x" data-file-width="947" data-file-height="947"/></span></span></td><td class="mbox-text">呢個模用到<a class="mw-selflink selflink">Lua語言</a>: <div><ul><li><a href="/wiki/%E6%A8%A1%E7%B5%84:Example" title="模組:Example">Module:Example</a></li></ul></div></td></tr></tbody></table> <p>Please place the {{<a href="/wiki/Template:Lua" class="mw-redirect" title="Template:Lua">lua</a>}} template on the documentation subpage of all templates that use Lua. It will help to better communicate Lua usage and template conversions. </p> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="睇埋" data-mw-thread-id="h-睇埋"><span id=".E7.9D.87.E5.9F.8B"></span><span data-mw-comment-start="" id="h-睇埋"></span>睇埋<span data-mw-comment-end="h-睇埋"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit&amp;section=13" title="編輯小節: 睇埋"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-\u7747\u57cb","replies":[]}}--></div> <ul><li><a href="/wiki/Special:%E5%85%A8%E9%83%A8%E9%A0%81%E5%98%85%E5%89%8D%E7%B6%B4/Module:" title="Special:全部頁嘅前綴/Module:">Special:PrefixIndex/Module:</a> – tracking of Lua modules can be done by using <a href="/wiki/Special:%E5%85%A8%E9%83%A8%E9%A0%81%E5%98%85%E5%89%8D%E7%B6%B4" title="Special:全部頁嘅前綴">Special:PrefixIndex</a></li> <li><a href="/w/index.php?title=Help:Lua_debugging&amp;action=edit&amp;redlink=1" class="new" title="Help:Lua debugging (無呢版)">Help:Lua debugging</a> – a how-to guide about <a href="/wiki/Debugging" class="mw-redirect" title="Debugging">debugging</a> Lua modules</li> <li><a href="/wiki/%E6%A8%A1%E7%B5%84:Sandbox" title="模組:Sandbox">Module:Sandbox</a> provides a pseudo-namespace for experimenting with Lua modules</li> <li><a href="/w/index.php?title=Wikipedia:Lua_requests&amp;action=edit&amp;redlink=1" class="new" title="Wikipedia:Lua requests (無呢版)">WP:Lua requests</a> – requests for Lua-based templates or tasks</li> <li><a href="/w/index.php?title=Category:Lua-based_templates&amp;action=edit&amp;redlink=1" class="new" title="Category:Lua-based templates (無呢版)">Category:Lua-based templates</a> – groups of Lua-based templates</li> <li><a href="/w/index.php?title=Category:Lua_metamodules&amp;action=edit&amp;redlink=1" class="new" title="Category:Lua metamodules (無呢版)">Category:Lua metamodules</a></li> <li><a href="https://www.mediawiki.org/wiki/Manual:Coding_conventions/Lua" class="extiw" title="mw:Manual:Coding conventions/Lua">Manual:Coding conventions/Lua</a> – standards to improve the readability of code through consistency</li> <li><a href="https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual" class="extiw" title="mw:Extension:Scribunto/Lua reference manual">mw:Extension:Scribunto/Lua reference manual</a> and all <a href="https://www.mediawiki.org/wiki/Special:PrefixIndex/Module:" class="extiw" title="mw:Special:PrefixIndex/Module:">Modules</a>.</li> <li><a href="/w/index.php?title=Wikipedia:Advanced_template_coding&amp;action=edit&amp;redlink=1" class="new" title="Wikipedia:Advanced template coding (無呢版)">Wikipedia:Advanced template coding</a></li></ul> <div class="mw-heading mw-heading2 ext-discussiontools-init-section"><h2 id="備註" data-mw-thread-id="h-備註"><span id=".E5.82.99.E8.A8.BB"></span><span data-mw-comment-start="" id="h-備註"></span>備註<span data-mw-comment-end="h-備註"></span></h2><span class="mw-editsection"><span class="mw-editsection-bracket">[</span><a href="/w/index.php?title=Wikipedia:Lua&amp;action=edit&amp;section=14" title="編輯小節: 備註"><span>編輯</span></a><span class="mw-editsection-bracket">]</span></span><!--__DTELLIPSISBUTTON__{"threadItem":{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-\u5099\u8a3b","replies":[]}}--></div> <style data-mw-deduplicate="TemplateStyles:r2020813">.mw-parser-output .reflist{font-size:90%;margin-bottom:0.5em;list-style-type:decimal}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}</style><div class="reflist"> <div class="mw-references-wrap"><ol class="references"> <li id="cite_note-1"><span class="mw-cite-backlink"><a href="#cite_ref-1">↑</a></span> <span class="reference-text">You can also have multiple output values, but functions that do this are not normally meant to be accessed from wiki pages.</span> </li> </ol></div></div> <p><a href="/w/index.php?title=Template:Wikipedia_technical_help&amp;action=edit&amp;redlink=1" class="new" title="Template:Wikipedia technical help (無呢版)">Template:Wikipedia technical help</a> </p> <!-- NewPP limit report Parsed by mw‐web.eqiad.main‐67f74ff9b9‐lxpsq Cached time: 20241029165039 Cache expiry: 2592000 Reduced expiry: false Complications: [show‐toc] DiscussionTools time usage: 0.010 seconds CPU time usage: 0.117 seconds Real time usage: 0.250 seconds Preprocessor visited node count: 426/1000000 Post‐expand include size: 2106/2097152 bytes Template argument size: 27/2097152 bytes Highest expansion depth: 8/100 Expensive parser function count: 2/500 Unstrip recursion depth: 0/20 Unstrip post‐expand size: 4172/5000000 bytes Lua time usage: 0.030/10.000 seconds Lua memory usage: 1331591/52428800 bytes Number of Wikibase entities loaded: 0/400 --> <!-- Transclusion expansion time report (%,ms,calls,template) 100.00% 186.955 1 -total 16.35% 30.565 1 Template:Lua 12.37% 23.131 1 Template:Reflist 7.14% 13.352 1 Template:See_also 5.02% 9.383 2 Template:Tl 4.63% 8.648 1 Template:Section_link 3.37% 6.305 1 Template:Main_other 1.80% 3.359 2 Template:Tag 0.60% 1.120 1 Template:Wikipedia_technical_help --> <!-- Saved in parser cache with key zh_yuewiki:pcache:idhash:119918-0!canonical and timestamp 20241029165039 and revision id 1582741. Rendering was triggered because: page-view --> </div><!--esi <esi:include src="/esitest-fa8a495983347898/content" /> --><noscript><img src="https://login.wikimedia.org/wiki/Special:CentralAutoLogin/start?type=1x1" alt="" width="1" height="1" style="border: none; position: absolute;"></noscript> <div class="printfooter" data-nosnippet="">由「<a dir="ltr" href="https://zh-yue.wikipedia.org/w/index.php?title=Wikipedia:Lua&amp;oldid=1582741">https://zh-yue.wikipedia.org/w/index.php?title=Wikipedia:Lua&amp;oldid=1582741</a>」收</div></div> <div id="catlinks" class="catlinks" data-mw="interface"><div id="mw-normal-catlinks" class="mw-normal-catlinks"><a href="/wiki/Special:%E5%88%86%E9%A1%9E" title="Special:分類">屬於2類</a>:<ul><li><a href="/wiki/Category:%E5%9F%BA%E6%96%BCLua%E5%98%85%E6%A8%A1" title="Category:基於Lua嘅模">基於Lua嘅模</a></li><li><a href="/wiki/Category:%E7%B6%AD%E5%9F%BA%E7%99%BE%E7%A7%91%E6%A8%A1%E7%B5%84" title="Category:維基百科模組">維基百科模組</a></li></ul></div><div id="mw-hidden-catlinks" class="mw-hidden-catlinks mw-hidden-cats-hidden">屬於1隱類:<ul><li><a href="/wiki/Category:%E6%9C%89%E8%85%B3%E6%9C%AC%E9%8C%AF%E8%AA%A4%E5%98%85%E7%89%88" title="Category:有腳本錯誤嘅版">有腳本錯誤嘅版</a></li></ul></div></div> </div> </main> </div> <div class="mw-footer-container"> <footer id="footer" class="mw-footer" > <ul id="footer-info"> <li id="footer-info-lastmod"> 呢版上次改係2021年3月14號 (禮拜日) 19:39 嘅事。</li> <li id="footer-info-copyright">呢度嘅所有文字係根據<a rel="nofollow" class="external text" href="//creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 牌照 4.0</a>嘅條款發佈;可能會有附加嘅條款。 利用呢個網站,你同意<a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use">利用條款</a>同埋<a class="external text" href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">私隱政策</a>。Wikipedia® 係<a rel="nofollow" class="external text" href="https://www.wikimediafoundation.org/">Wikimedia Foundation, Inc.</a> 嘅註冊商標,一個非牟利機構。</li> </ul> <ul id="footer-places"> <li id="footer-places-privacy"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy">私隱政策</a></li> <li id="footer-places-about"><a href="/wiki/Wikipedia:%E9%97%9C%E6%96%BC">關於維基百科</a></li> <li id="footer-places-disclaimers"><a href="/wiki/Wikipedia:%E4%B8%80%E8%88%AC%E5%85%8D%E8%B2%AC%E8%81%B2%E6%98%8E">免責聲明</a></li> <li id="footer-places-wm-codeofconduct"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct">行為準則</a></li> <li id="footer-places-developers"><a href="https://developer.wikimedia.org">開發人員</a></li> <li id="footer-places-statslink"><a href="https://stats.wikimedia.org/#/zh-yue.wikipedia.org">統計</a></li> <li id="footer-places-cookiestatement"><a href="https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement">Cookie聲明</a></li> <li id="footer-places-mobileview"><a href="//zh-yue.m.wikipedia.org/w/index.php?title=Wikipedia:Lua&amp;mobileaction=toggle_view_mobile" class="noprint stopMobileRedirectToggle">手提版</a></li> </ul> <ul id="footer-icons" class="noprint"> <li id="footer-copyrightico"><a href="https://wikimediafoundation.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/static/images/footer/wikimedia-button.svg" width="84" height="29" alt="Wikimedia Foundation" loading="lazy"></a></li> <li id="footer-poweredbyico"><a href="https://www.mediawiki.org/" class="cdx-button cdx-button--fake-button cdx-button--size-large cdx-button--fake-button--enabled"><img src="/w/resources/assets/poweredby_mediawiki.svg" alt="Powered by MediaWiki" width="88" height="31" loading="lazy"></a></li> </ul> </footer> </div> </div> </div> <div class="vector-settings" id="p-dock-bottom"> <ul></ul> </div><script>(RLQ=window.RLQ||[]).push(function(){mw.config.set({"wgHostname":"mw-web.codfw.main-f69cdc8f6-vrhlg","wgBackendResponseTime":133,"wgDiscussionToolsPageThreads":[{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-簡介","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Lua模組用法-簡介","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-點整一個Lua模組-簡介","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-運行模組","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-用參數-運行模組","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-歷史","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-關於Lua","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Unit_testing","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Wikipedia-specific_features","replies":[{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Lua_input_limitations-Wikipedia-specific_features","replies":[]},{"headingLevel":3,"name":"h-","type":"heading","level":0,"id":"h-Wikitext-Wikipedia-specific_features","replies":[]}]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-Labeling_converted_templates","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-睇埋","replies":[]},{"headingLevel":2,"name":"h-","type":"heading","level":0,"id":"h-備註","replies":[]}],"wgPageParseReport":{"discussiontools":{"limitreport-timeusage":"0.010"},"limitreport":{"cputime":"0.117","walltime":"0.250","ppvisitednodes":{"value":426,"limit":1000000},"postexpandincludesize":{"value":2106,"limit":2097152},"templateargumentsize":{"value":27,"limit":2097152},"expansiondepth":{"value":8,"limit":100},"expensivefunctioncount":{"value":2,"limit":500},"unstrip-depth":{"value":0,"limit":20},"unstrip-size":{"value":4172,"limit":5000000},"entityaccesscount":{"value":0,"limit":400},"timingprofile":["100.00% 186.955 1 -total"," 16.35% 30.565 1 Template:Lua"," 12.37% 23.131 1 Template:Reflist"," 7.14% 13.352 1 Template:See_also"," 5.02% 9.383 2 Template:Tl"," 4.63% 8.648 1 Template:Section_link"," 3.37% 6.305 1 Template:Main_other"," 1.80% 3.359 2 Template:Tag"," 0.60% 1.120 1 Template:Wikipedia_technical_help"]},"scribunto":{"limitreport-timeusage":{"value":"0.030","limit":"10.000"},"limitreport-memusage":{"value":1331591,"limit":52428800}},"cachereport":{"origin":"mw-web.eqiad.main-67f74ff9b9-lxpsq","timestamp":"20241029165039","ttl":2592000,"transientcontent":false}}});});</script> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10