<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hant-TW">
	<id>https://chunghwamc.com/wiki/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E7%B5%84%3ANo_globals</id>
	<title>模組:No globals - 修訂紀錄</title>
	<link rel="self" type="application/atom+xml" href="https://chunghwamc.com/wiki/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E7%B5%84%3ANo_globals"/>
	<link rel="alternate" type="text/html" href="https://chunghwamc.com/wiki/index.php?title=%E6%A8%A1%E7%B5%84:No_globals&amp;action=history"/>
	<updated>2026-04-06T02:31:39Z</updated>
	<subtitle>本 wiki 上此頁面的修訂紀錄</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://chunghwamc.com/wiki/index.php?title=%E6%A8%A1%E7%B5%84:No_globals&amp;diff=144&amp;oldid=prev</id>
		<title>Chunghwamc：​建立內容為「local mt = getmetatable(_G) or {} function mt.__index (t, k) 	if k ~= &#039;arg&#039; then 		error(&#039;嘗試讀取空全域變數：&#039; .. tostring(k), 2) 	end 	return nil end function mt.__newindex(t, k, v) 	if k ~= &#039;arg&#039; then 		error(&#039;嘗試寫入全域變數：&#039; .. tostring(k), 2) 	end 	rawset(t, k, v) end setmetatable(_G, mt)」的新頁面</title>
		<link rel="alternate" type="text/html" href="https://chunghwamc.com/wiki/index.php?title=%E6%A8%A1%E7%B5%84:No_globals&amp;diff=144&amp;oldid=prev"/>
		<updated>2024-03-23T14:44:19Z</updated>

		<summary type="html">&lt;p&gt;建立內容為「local mt = getmetatable(_G) or {} function mt.__index (t, k) 	if k ~= &amp;#039;arg&amp;#039; then 		error(&amp;#039;嘗試讀取空全域變數：&amp;#039; .. tostring(k), 2) 	end 	return nil end function mt.__newindex(t, k, v) 	if k ~= &amp;#039;arg&amp;#039; then 		error(&amp;#039;嘗試寫入全域變數：&amp;#039; .. tostring(k), 2) 	end 	rawset(t, k, v) end setmetatable(_G, mt)」的新頁面&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新頁面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local mt = getmetatable(_G) or {}&lt;br /&gt;
function mt.__index (t, k)&lt;br /&gt;
	if k ~= &amp;#039;arg&amp;#039; then&lt;br /&gt;
		error(&amp;#039;嘗試讀取空全域變數：&amp;#039; .. tostring(k), 2)&lt;br /&gt;
	end&lt;br /&gt;
	return nil&lt;br /&gt;
end&lt;br /&gt;
function mt.__newindex(t, k, v)&lt;br /&gt;
	if k ~= &amp;#039;arg&amp;#039; then&lt;br /&gt;
		error(&amp;#039;嘗試寫入全域變數：&amp;#039; .. tostring(k), 2)&lt;br /&gt;
	end&lt;br /&gt;
	rawset(t, k, v)&lt;br /&gt;
end&lt;br /&gt;
setmetatable(_G, mt)&lt;/div&gt;</summary>
		<author><name>Chunghwamc</name></author>
	</entry>
</feed>