विकिपीडिया:लुआ: रिवीजन सभ के बीचा में अंतर

Content deleted Content added
छो सत्यम् मिश्र moved page विकिपीडिया:Lua to विकिपीडिया:लुआ
छो छोट अनुबाद, replaced: == See also == → == इहो देखल जाय == using AWB
 
लाइन 19:
For example, we can run [[Module:Bananas]] in this way, which has one function named "hello".
 
* <code><nowiki>{{#invoke:Bananas|hello}}</nowiki></code> &rarr; {{#invoke:Bananas|hello}}
 
=== Using arguments ===
लाइन 28:
 
For example, in [[Module:BananasArgs]], the "hello" function greets different people depending on the first positional argument. It works like this:
* <code><nowiki>{{#invoke:BananasArgs|hello|Kate}}</nowiki></code> &rarr; {{#invoke:BananasArgs|hello|Kate}}
* <code><nowiki>{{#invoke:BananasArgs|hello|Fred}}</nowiki></code> &rarr; {{#invoke:BananasArgs|hello|Fred}}
 
BananasArgs also has a function named "count_fruit" which uses the named arguments <code>bananas</code> and <code>apples</code> to count the number of bananas and apples we have. It can be run like this:
* <code><nowiki>{{#invoke:BananasArgs|count_fruit|apples=3|bananas=4}}</nowiki></code> &rarr; {{#invoke:BananasArgs|count_fruit|apples=3|bananas=4}}
* <code><nowiki>{{#invoke:BananasArgs|count_fruit|bananas=5|apples=2}}</nowiki></code> &rarr; {{#invoke:BananasArgs|count_fruit|bananas=5|apples=2}}
 
Most modules will have a documentation page explaining what arguments can be used and what their effects will be.
लाइन 118:
{{clear}}
 
== इहो देखल जाय ==
== See also ==
; English Wikipedia-specific resources
* [[Wikipedia:Lua style guide]] &ndash; standards to improve the readability of code through consistency