Module:User:Atitarev

From Wiktionary, the free dictionary
Jump to navigation Jump to search

This is a private module sandbox of Atitarev, for his own experimentation. Items in this module may be added and removed at Atitarev's discretion; do not rely on this module's stability.


local export = {}

function export.test(frame)
    local forms = {}

    forms["test1"] = "blah"
    forms["test2"] = "blah2"
    
    local result = ""
    local temp_string
    if forms["test2"] then
        temp_string = ", test2 = " .. forms["test2"]
    end
    
    result = "Hard-coded test, test1 = " .. forms["test1"] .. ", test2 = " ..  forms["test2"] .. "."
    result = "if-statement test, test1 = " .. forms["test1"] .. temp_string .. "." 

    return result
end

return export