<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://zh.enter-politics.com/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3AVar-array</id>
	<title>模块:Var-array - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://zh.enter-politics.com/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3AVar-array"/>
	<link rel="alternate" type="text/html" href="https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Var-array&amp;action=history"/>
	<updated>2026-06-29T02:56:45Z</updated>
	<subtitle>本wiki的该页面的版本历史</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Var-array&amp;diff=11444&amp;oldid=prev</id>
		<title>DrTompkins：导入1个版本</title>
		<link rel="alternate" type="text/html" href="https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Var-array&amp;diff=11444&amp;oldid=prev"/>
		<updated>2023-04-12T04:17:35Z</updated>

		<summary type="html">&lt;p&gt;导入1个版本&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2023年4月12日 (三) 04:17的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;zh&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;（没有差异）&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>DrTompkins</name></author>
	</entry>
	<entry>
		<id>https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Var-array&amp;diff=11443&amp;oldid=prev</id>
		<title>zhmoe&gt;屠麟傲血：已保护“Module:Var-array”：​高流量页面（[编辑=仅允许管理员和技术编辑员]（无限期）[移动=仅允许管理员]（无限期））</title>
		<link rel="alternate" type="text/html" href="https://zh.enter-politics.com/index.php?title=%E6%A8%A1%E5%9D%97:Var-array&amp;diff=11443&amp;oldid=prev"/>
		<updated>2022-11-08T15:52:25Z</updated>

		<summary type="html">&lt;p&gt;已保护“&lt;a href=&quot;/wiki/%E6%A8%A1%E5%9D%97:Var-array&quot; title=&quot;模块:Var-array&quot;&gt;Module:Var-array&lt;/a&gt;”：​高流量页面（[编辑=仅允许管理员和技术编辑员]（无限期）[移动=仅允许管理员]（无限期））&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local module = {}&lt;br /&gt;
&lt;br /&gt;
function module.new(name, array)&lt;br /&gt;
	local frame = mw.getCurrentFrame()&lt;br /&gt;
	local idCount = frame:callParserFunction( '#var', 'array.idCount', 0)&lt;br /&gt;
	function foo(name, array)&lt;br /&gt;
		name = '@array-innerArrayIdentifier:'..name&lt;br /&gt;
		frame:callParserFunction( '#vardefine', name, name)&lt;br /&gt;
		for i, v in ipairs(array) do&lt;br /&gt;
			if type(v) == 'table' then&lt;br /&gt;
				idCount = idCount + 1&lt;br /&gt;
				local innerArrayName = name..'___'..idCount..'___'&lt;br /&gt;
				foo(innerArrayName, v)&lt;br /&gt;
				v = '@array-innerArrayIdentifier:'..innerArrayName&lt;br /&gt;
			end&lt;br /&gt;
			frame:callParserFunction( '#vardefine', name..i, v)		&lt;br /&gt;
		end&lt;br /&gt;
		frame:callParserFunction( '#vardefine', name..'.count', #array)&lt;br /&gt;
	end&lt;br /&gt;
	foo(name, array)&lt;br /&gt;
	&lt;br /&gt;
	frame:callParserFunction( '#vardefine', 'array.idCount', idCount)&lt;br /&gt;
	return name&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function module.get(name)&lt;br /&gt;
	local frame = mw.getCurrentFrame()&lt;br /&gt;
	if type(name) == 'nil' then return nil end&lt;br /&gt;
	local time = 0&lt;br /&gt;
	function foo(name)&lt;br /&gt;
		local array = {}&lt;br /&gt;
		&lt;br /&gt;
		time = time + 1&lt;br /&gt;
		if time == 1 then&lt;br /&gt;
			name = '@array-innerArrayIdentifier:'..name&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		local count = frame:callParserFunction( '#var', name..'.count')		&lt;br /&gt;
		if count == '' then return false end&lt;br /&gt;
		for i=1, count do&lt;br /&gt;
			local val = frame:callParserFunction('#var', name..i)&lt;br /&gt;
			if string.find(val, '^@array%-innerArrayIdentifier:') then&lt;br /&gt;
				array[i] = foo(val)&lt;br /&gt;
			else&lt;br /&gt;
				array[i] = val&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return array&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return foo(name)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return module&lt;/div&gt;</summary>
		<author><name>zhmoe&gt;屠麟傲血</name></author>
	</entry>
</feed>