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 fonton]
- hello
- Returns a string like
Hello, world! This is Lua!
1
– (optional) name of the recipient- Default:
world
- Default:
Syntax example[redakti fonton]
For templates this means:
- without parameter:
{{#invoke:Saluton|hello}}
- yields:
Saluton, mondo! Tio estas Lua!
- yields:
- with parameter:
{{#invoke:Saluton|hello|John Doe}}
- yields:
Saluton, John Doe! Tio estas Lua!
- yields:
Functions for Lua modules[redakti fonton]
(None which could be called via require)
Local implementation[redakti fonton]
- hello(frame)
- Returns the string.
frame
– Call environmentframe.args[ 1 ]
– Passed first unnamed parameter: name of the recipient
Dependencies[redakti fonton]
(No other module required)
Usage[redakti fonton]
Any test scenario.
Origin[redakti fonton]
- de:Modul:Hello, en:Module:Bananas and others.