<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2Fpietrasagh</id>
	<title>Module:Sandbox/pietrasagh - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2Fpietrasagh"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/pietrasagh&amp;action=history"/>
	<updated>2026-05-28T08:59:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sandbox/pietrasagh&amp;diff=146563&amp;oldid=prev</id>
		<title>imported&gt;Pietrasagh at 12:27, 27 August 2022</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/pietrasagh&amp;diff=146563&amp;oldid=prev"/>
		<updated>2022-08-27T12:27:32Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {};     --All Lua modules on Wikipedia must begin by defining a variable &lt;br /&gt;
                    --that will hold their externally accessible functions.&lt;br /&gt;
                    --Such variables can have whatever name you want and may &lt;br /&gt;
                    --also contain various data as well as functions.&lt;br /&gt;
p.hello = function( frame )     --Add a function to &amp;quot;p&amp;quot;.  &lt;br /&gt;
                                        --Such functions are callable in Wikipedia&lt;br /&gt;
                                        --via the #invoke command.&lt;br /&gt;
                                        --&amp;quot;frame&amp;quot; will contain the data that Wikipedia&lt;br /&gt;
                                        --sends this function when it runs. &lt;br /&gt;
                                 -- &amp;#039;Hello&amp;#039; is a name of your choice. The same name needs to be referred to when the module is used.&lt;br /&gt;
    &lt;br /&gt;
    local str = &amp;quot;Hello World!&amp;quot;  --Declare a local variable and set it equal to&lt;br /&gt;
                                --&amp;quot;Hello World!&amp;quot;.  &lt;br /&gt;
    &lt;br /&gt;
    return str    --This tells us to quit this function and send the information in&lt;br /&gt;
                  --&amp;quot;str&amp;quot; back to Wikipedia.&lt;br /&gt;
    &lt;br /&gt;
end  -- end of the function &amp;quot;hello&amp;quot;&lt;br /&gt;
function p.a(frame)		-- Add another function&lt;br /&gt;
	local name = frame.args.test  -- To access arguments passed to a module, use `frame.args`&lt;br /&gt;
							    -- `frame.args[1]` refers to the first unnamed parameter&lt;br /&gt;
							    -- given to the module&lt;br /&gt;
	return &amp;quot;A kuku!&amp;quot; .. name	-- `..` concatenates strings. This will return a customized&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p    --All modules end by returning the variable containing their functions to Wikipedia.&lt;br /&gt;
-- Now we can use this module by calling {{#invoke: Example | hello }},&lt;br /&gt;
-- {{#invoke: Example | hello_to | foo }}, or {{#invoke:Example|count_fruit|bananas=5|apples=6}}&lt;br /&gt;
-- Note that the first part of the invoke is the name of the Module&amp;#039;s wikipage,&lt;br /&gt;
-- and the second part is the name of one of the functions attached to the &lt;br /&gt;
-- variable that you returned.&lt;br /&gt;
&lt;br /&gt;
-- The &amp;quot;print&amp;quot; function is not allowed in Wikipedia.  All output is accomplished&lt;br /&gt;
-- via strings &amp;quot;returned&amp;quot; to Wikipedia.&lt;/div&gt;</summary>
		<author><name>imported&gt;Pietrasagh</name></author>
	</entry>
</feed>