"వికీపీడియా:Lua" కూర్పుల మధ్య తేడాలు

→‎About Lua: don't mention coroutines, we don't support them
imported>Wikid77
(+bottom link "WP:Lua requests" for old browsers which cannot access top navbox.)
(→‎About Lua: don't mention coroutines, we don't support them)
== About Lua ==
[[File:WMF Tech Talk 2013-02-28 slides - Scribunto presentation.pdf|thumbnail|Brad Jorsch’s short presentation for a basic example of how to convert a wikitext template into a Lua module.]]
Lua is a [[scripting language]] which can be used to analyze data, calculate expressions, and format results using functions or [[object-oriented programming]]. Although some Lua script can be kept simple, for easy understanding, Lua allows complex structures which would challenge a [[computer scientist]], with tables, dynamic functions, and [[associative array]]s where index [[subscript]]s can be words as well as index numbers. Lua also supports [[recursion]] of re-nested functions or allows [[coroutine]]s for cooperative [[multitasking]], so care should be taken to avoid excessive complexity where other users would not understand how to maintain a Lua module. The following is an example of Lua [[source code]] for a [[factorial]] function:
<syntaxhighlight lang="lua">
function factorial(n)
"https://te.wikipedia.org/wiki/ప్రత్యేక:MobileDiff/1387544" నుండి వెలికితీశారు