Module:Timing/doc: Difference between revisions

Content deleted Content added
m Typo fixing, replaced: occurences → occurrences, typo(s) fixed: As a result → As a result,, ie. → i.e. , stripped down → stripped-down
Testing a plain function: Example module consolidation
Line 15:
 
=== Testing a plain function ===
For example, assume we open a page [[Module:HelloWorldExample]], then we can write a call to profile the function p.hello(). The code in the page looks something like the example below, but local versions may be a little different. (At ''nowiki'' a similar code is at [[w:no:Module:HelloWorld2]].)
 
The following code is a stripped-down version of [[Module:HelloWorldExample]]. See the page for a full version.
<source lang="lua">
my_objectlocal p = {};
 
my_objectp.hello = function( frame )
local str = "Hello World!"
return str
end
 
return my_object p
</source>