Modul:Luafunktionstest: Unterschied zwischen den Versionen

Aus SchnuppTrupp
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „-- For unit tests, see Module:Bananas/testcases local p = {} function p.hello() return "Hello, world!" end return p“)
 
 
(6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
 
-- For unit tests, see [[Module:Bananas/testcases]]
 
-- For unit tests, see [[Module:Bananas/testcases]]
local p = {}
+
-- local p = {}
  
function p.hello()
+
function add(a,b)
return "Hello, world!"
+
    local a
 +
    local b
 +
    return a+b
 +
--    p = result .. ':a + b is ' .. a + b .. '\n'
 +
--    return p
 
end
 
end
 
return p
 

Aktuelle Version vom 3. Januar 2017, 13:05 Uhr

Die Dokumentation für dieses Modul kann unter Modul:Luafunktionstest/Doku erstellt werden

-- For unit tests, see [[Module:Bananas/testcases]]
-- local p = {}

function add(a,b)
    local a 
    local b 
     return a+b
--    p = result .. ':a + b is ' .. a + b .. '\n'
--    return p
end