Modül:Row numbers
require('Module:No globals');
local p={}
local count = 0; -- initial values
local hcount = count;
----------------------------------------------------------------------------------------
returns a counter value according to the keyword extracted from the table; maintains count and hcount The keywords have the meanings: _row_count: use row counter value (count); the hold counter (hcount) is same as count _row_count_hold:	use the value currently assigned to hcount; bump count but do not bump hcount
local function get_count (keyword) count = count + 1; -- always bump the count if '_row_count' == keyword then -- bump hcount, return new count value hcount = count; return count; elseif '_row_count_hold' == keyword then -- current hcount value without increment return hcount; end
end
--[[----------------------------------------------------------------------------------
replaces keywords _row_count and _row_count_hold from the table in frame. args[1]
]]
function p. row_numbers (frame) if not frame.