Modul:Citation/CS1: Redaktələr arasındakı fərq
Redaktənin izahı yoxdur |
Redaktənin izahı yoxdur |
||
| Sətir 19: | Sətir 19: | ||
--[[--------------------------< P A G E S C O P E V A R I A B L E S >-------------------------------------- | |||
declare variables here that have page-wide scope that are not brought in from other modules; that are created here and used here | |||
]] | |||
local added_deprecated_cat; -- Boolean flag so that the category is added only once | local added_deprecated_cat; -- Boolean flag so that the category is added only once | ||
| Sətir 27: | Sətir 31: | ||
--[[--------------------------< F I R S T _ S E T >------------------------------------------------------------ | |||
Locates and returns the first set value in a table of values where the order established in the table, | |||
left-to-right (or top-to-bottom), is the order in which the values are evaluated. Returns nil if none are set. | |||
This version replaces the original 'for _, val in pairs do' and a similar version that used ipairs. With the pairs | |||
version the order of evaluation could not be guaranteed. With the ipairs version, a nil value would terminate | |||
the for-loop before it reached the actual end of the list. | |||
]] | |||
local function first_set (list, count) | local function first_set (list, count) | ||