Module:sarritest/param
Module:sarritest » Module:sarritest/param :: Module:sarritest/data :: « Module:sarritest/τεκμηρίωση (documentation) -- wikt:el:User:Sarri.greek
Template:sarritest: καλεί/invokes module, function main.
Check errors at Κατηγορία:Σελίδες με σφάλματα δέσμης ενεργειών
-- [[Module:sarritest]] - [[Module:sarritest/param]] - [[Module:sarritest/data]] - [[wikt:el:Sarri.greek]]
-- [[Template:sarritest]]
--[=[
INSTRUCTIONS for param page:
call it: local function somename (args)
end with: return {somename = somename}
Call if from the Module by placing EXACTLY where it is needed:
require ('Module:xxx/somename').somename (args)
DO NOT change anything else. DO NOT add at top of page a m_zzz = require this and that.
-- USE: local for the functions of THIS module
]=]--
--[=[
TRIAL for
]=]--
--------------------------------------------------------------------------
-- HERE parameters or functions needed (from the Module or extras)
--------------------------------------------------------------------------
-- ...
--[=[--------------------------< I S _ S E T >------------ -- by [[w:en:User talk:Trappist the monk]]
Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string.
]=]--
--[=[ explanation:
The is_set() function may be added so that tests like this:
if args['ακε'] ~= '' and args['ακε'] ~= nil then args['ακε'] = args['ακε'] else args['ακε'] = '' end
can be reduced to:
if not is_set (args['ακε']) then args['ακε'] = '' end
]=]--
local function is_set (var)
return not (var == nil or var == '');
end
--------------------------------------------------------------------------
-- function --
--------------------------------------------------------------------------
local function param (args)
-- ... BLOCK
-- ---------------------------------
end -- close function
return {param = param}