Vikipedio:Lua/Moduloj/Saluton/en

El Vikipedio, la libera enciklopedio
Ŝ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 fonton]

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

Syntax example[redakti fonton]

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 fonton]

(None which could be called via require)

Local implementation[redakti fonton]

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

Dependencies[redakti fonton]

(No other module required)

Any test scenario.