local function splitStr(theString)
local stringTable = {}
local i = 1
for str in string.gmatch(theString, "[^%s]+") do
stringTable[i] = str
i = i + 1
end
return stringTable, i
end
local splitStrTable, numOfStr = splitStr("The Turtle")
for j = 1, numOfStr do
print(string.format("%d : %s", j, splitStrTable[j]))
end
local function getSumMore(...)
local sum = 0
for key, value in pairs { ... } do
sum = sum + value
end
return sum
end
io.write("Sum : ", getSumMore(1, 2, 3, 4, 5, 6), "\n")