<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="hr">
	<id>https://croatianschoolsydney.com/index.php?action=history&amp;feed=atom&amp;title=Modul%3ACallAssert</id>
	<title>Modul:CallAssert - Povijest promjena</title>
	<link rel="self" type="application/atom+xml" href="https://croatianschoolsydney.com/index.php?action=history&amp;feed=atom&amp;title=Modul%3ACallAssert"/>
	<link rel="alternate" type="text/html" href="https://croatianschoolsydney.com/index.php?title=Modul:CallAssert&amp;action=history"/>
	<updated>2026-05-21T03:58:27Z</updated>
	<subtitle>Povijest promjena ove stranice na wikiju</subtitle>
	<generator>MediaWiki 1.36.2</generator>
	<entry>
		<id>https://croatianschoolsydney.com/index.php?title=Modul:CallAssert&amp;diff=314719&amp;oldid=prev</id>
		<title>WikiSysop: Stvorena nova stranica sa sadržajem: »local function pack(...) 	return {...}, select('#', ...) end  local function mapArray(func, array, count) 	local result = {} 	for i = 1, count or #array...«.</title>
		<link rel="alternate" type="text/html" href="https://croatianschoolsydney.com/index.php?title=Modul:CallAssert&amp;diff=314719&amp;oldid=prev"/>
		<updated>2021-11-10T11:01:05Z</updated>

		<summary type="html">&lt;p&gt;Stvorena nova stranica sa sadržajem: »local function pack(...) 	return {...}, select(&amp;#039;#&amp;#039;, ...) end  local function mapArray(func, array, count) 	local result = {} 	for i = 1, count or #array...«.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nova stranica&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local function pack(...)&lt;br /&gt;
	return {...}, select('#', ...)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function mapArray(func, array, count)&lt;br /&gt;
	local result = {}&lt;br /&gt;
	for i = 1, count or #array do&lt;br /&gt;
		result[i] = func(array[i])&lt;br /&gt;
	end&lt;br /&gt;
	return result&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function quote(value)&lt;br /&gt;
	if type(value) == 'string' then&lt;br /&gt;
		return (string.gsub(string.format('%q', value), '\\\n', '\\n'))  -- Outer parentheses remove second value returned by gsub&lt;br /&gt;
	end&lt;br /&gt;
	local str = tostring(value)&lt;br /&gt;
	if type(value) == 'table' and str ~= 'table' then&lt;br /&gt;
		return '{' .. str .. '}'&lt;br /&gt;
	end&lt;br /&gt;
	return str&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function callAssert(func, funcName, ...)&lt;br /&gt;
	local result, resultCount = pack(func(...))&lt;br /&gt;
	if not result[1] then&lt;br /&gt;
		local args, argsCount = pack(...)&lt;br /&gt;
		args = mapArray(quote, args, argsCount)&lt;br /&gt;
		local message = mw.ustring.format(&lt;br /&gt;
			'%s(%s) failed',&lt;br /&gt;
			funcName,&lt;br /&gt;
			table.concat(args, ', ')&lt;br /&gt;
		)&lt;br /&gt;
		error(message, 2)&lt;br /&gt;
	end&lt;br /&gt;
	return unpack(result, 1, resultCount)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return callAssert&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
</feed>