يمكنك أن تنشئ صفحة توثيق لهذه الوحدة (أنشئ). يمكن للمحررين تجريب تعديلاتهم على الوحدة في صفحات ملعب (أنشئ | مرآة) ومختبر (أنشئ). من فضلك أضف التصنيفات في الصفحة الفرعية للقالب /شرح. الصفحات الفرعية لـ وحدة.
-- This module implements {{parameter names example}}.localp={}localfunctionmakeParam(s)locallb='{'localrb='}'returnlb:rep(3)..s..rb:rep(3)endlocalfunctionitalicize(s)return"''"..s.."''"endlocalfunctionplain(s)returnsendfunctionp._main(args,frame)-- Find how we want to format the arguments to the template.localformatFuncifargs._display=='italics'orargs._display=='italic'thenformatFunc=italicizeelseifargs._display=='plain'thenformatFunc=plainelseformatFunc=makeParamend-- Build the table of template arguments.localtargs={}fork,vinpairs(args)doiftype(k)=='number'thentargs[v]=formatFunc(v)elseifnotk:find('^_')thentargs[k]=vendend-- Find the template name.localtemplateifargs._templatethentemplate=args._templateelselocalcurrentTitle=mw.title.getCurrentTitle()ifcurrentTitle.prefixedText:find('/sandbox$')thentemplate=currentTitle.prefixedTextelsetemplate=currentTitle.basePageTitle.prefixedTextendend-- Call the template with the arguments.frame=frameormw.getCurrentFrame()localsuccess,result=pcall(frame.expandTemplate,frame,{title=template,args=targs})ifsuccessthenreturnresultelsereturn''endendfunctionp.main1(frame)localargs=require('Module:Arguments').getArgs(frame,{wrappers='قالب:مثال وسائط قالب'})returnp._main(args,frame)endfunctionp.main(frame)localargs=require('Module:Arguments').getArgs(frame,{wrappers='Template:Parameter names example'})returnp._main(args,frame)endreturnp