Posted 16 June 2012 - 02:54 AM
I'm sure I understand this bit of code, will comment on what I think each line does/mean.
My question is basically how can I emulate this inside a program? I want to decode a message from rednet into "arguments" and then pass these to a function.
Bonus question (for bonus points): What does the ellipse in lua mean? (ex. '…')
local tArgs = { ... } --Array containing all arguments
if #tArgs > 0 then --'#' returns index of an array, line checks tArgs to make sure there is at least one value.
print( "" ) --Prints program usage or coder-defined action.
print( "" )
return --good practice to return all functions, I do not do it but I may have to start.
end
My question is basically how can I emulate this inside a program? I want to decode a message from rednet into "arguments" and then pass these to a function.
Bonus question (for bonus points): What does the ellipse in lua mean? (ex. '…')