Vikipedio:Lua/Moduloj/Saluton/en

Ŝablona programado Diskutoj Lua Testoj Subpaĝoj
Modulo Esperanto English Deutsch

Modulo: Dokumentado

Saluton – module for demonstration of Lua usage within a Wiki-project.

Functions for templates redakti

hello
Returns a string like Hello, world! This is Lua!
  • 1(optional) name of the recipient
    • Default: world

Syntax example redakti

For templates this means:

  • without parameter: {{#invoke:Saluton|hello}}
    • yields: Saluton, mondo! Tio estas Lua!
  • with parameter: {{#invoke:Saluton|hello|John Doe}}
    • yields: Saluton, John Doe! Tio estas Lua!

Functions for Lua modules redakti

(None which could be called via require)

Local implementation redakti

hello(frame)
Returns the string.
frame – Call environment
  • frame.args[ 1 ] – Passed first unnamed parameter: name of the recipient

Dependencies redakti

(No other module required)

Any test scenario.

Origin redakti